On 04/09/17 17:38, Brian Goetz wrote:
These send a clear signal to the caller about what sort of arguments
can be passed (though the compiler still need to apply additional
constraints, such as the constables being compile-time constant
expressons.) You could validly argue either way; that "because the
compiler still must apply additional outside-the-type-system checks,
these could just as well be Object", and also that the type
specificity helps users understand the API better.
A possible third option when reading this would be:
Intrinsics.ldc(@FoldableConstant Object c)
BootstrapSpecifier.of(MethodHandleRef bootstrap, @FoldableConstant
Object... staticArgs)
That is, decouple constant-ness from the type system, and use a
dedicated annotation to do that.
Maurizio