<i18n dev> RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v65]

Joe Darcy darcy at openjdk.org
Sat May 6 02:44:30 UTC 2023

On Thu, 27 Apr 2023 17:21:23 GMT, Jim Laskey <jlaskey at 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:
>   CSR recommendations

src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 123:

> 121:     @PreviewFeature(feature=PreviewFeature.Feature.STRING_TEMPLATES)
> 122:     public static final int MAX_INDY_CONCAT_ARG_SLOTS;
> 123:     static { MAX_INDY_CONCAT_ARG_SLOTS = 200; }

I think this deserve a comment such as "use static initialize block to avoid MAX_INDY_CONCAT_ARG_SLOTS being treating as a constant for constant folding," assuming that is the intention here.


PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1186599844

More information about the i18n-dev mailing list