Feedback: String Templates (JEP 430)

Duncan MacGregor duncan.macgregor at servicenow.com
Mon Apr 3 10:41:59 UTC 2023


While I agree that compile time type checking and constants are a separate topic, string templates, and especially the template formatter, seem like a reasonable entry point to think about them as they rely on a new bit of syntax and are being compiled to something special (an invoke dynamic based callsite whose bootstrap takes the fragments and the method type). The problem I see at the moment is that it’s not clear to me that the type information remains available to the processor in a way that would make for compile time type checking to be added later, and it would be a shame if we cut this path off now. The ProcessorLinkage interface feels like it might be closer to path allowing this, but I see that it’s sealed at the moment.
It would be sad if we can’t leverage a new way of string formatting to introduce compile time type checking of those format strings when it feels like we’re really close to being on a path that would enable it in a natural way.
Duncan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230403/28889647/attachment.htm>


More information about the amber-dev mailing list