Currently `const` is limited to strings & numb...
# language-evolution
j
Currently
const
is limited to strings & numbers, but Java 11+ supports dynamic constants. Any thoughts on whether it's worth adding them?
j
Yes, but there's nothing stopping us adding new bootstraps.
e
well not if you want to run on Android, but on JVM sure
j
Android 11 claims Java 11 compatibility, though.
e
Android versions doesn't map exactly to Java versions. most Java 11 APIs are supported, some are not
j
My mistake, it was Android 12.
And I'm aware of the limitations.
Same limitation applies to people who want to target Java 8.
e
Android 12's adds invoke-polymorphic which can handle invoke-dynamic use cases. that doesn't mean there is an equivalent for CONSTANT_Dynamic. https://issuetracker.google.com/issues/198142625
j
Huh, TIL.
Bah, probably not worth it for a Java-only feature.