On Fri, 18 Nov 2022 14:10:11 GMT, Jim Laskey <jlas...@openjdk.org> wrote:
>> Enhance the Java programming language with string templates, which are >> similar to string literals but contain embedded expressions. A string >> template is interpreted at run time by replacing each expression with the >> result of evaluating that expression, possibly after further validation and >> transformation. This is a [preview language feature and >> API](http://openjdk.java.net/jeps/12). > > Jim Laskey has updated the pull request incrementally with one additional > commit since the last revision: > > Typo src/java.base/share/classes/java/util/Digits.java line 39: > 37: */ > 38: @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES) > 39: interface Digits { Should this be modeled as an `abstract sealed` class hierarchy instead? test/micro/org/openjdk/bench/java/lang/template/StringTemplateFMT.java line 41: > 39: /* > 40: * This benchmark measures StringTemplate.FMT FormatProcessor performance; > 41: * exactly mirroring {@link org.openjdk.bench.java.lang.StringFormat} > benchmark While it's good to mirror the `StringFormat` benchmark, I think we'd see benefit from building this out to be a bit more comprehensive and for example cover `FormatConcatItem` cases. What you have here is probably good enough for first integration, though. ------------- PR: https://git.openjdk.org/jdk/pull/10889