JDK-8329949 : Remove the String Templates preview feature
  • Type: CSR
  • Component: core-libs
  • Priority: P2
  • Status: Closed
  • Resolution: Approved
  • Fix Versions: 23
  • Submitted: 2024-04-09
  • Updated: 2024-06-13
  • Resolved: 2024-04-15
Related Reports
CSR :  
Relates :  
Relates :  
Description
Summary
-------

Remove support for the preview feature "String Templates" from the Java compiler and the Java API.

Problem
-------

String templates were previewed in Java 21 (JEP 430) and re-previewed in Java 22 (JEP 459). After some experience with the prototype, it became clear that the processor-centric nature of the proposed design was confusing to users and lacked the desired compositionality. These problems were described in a post on the amber-spec-experts mailing list:

https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html

Solution
--------

As there's no clear consensus on how to re-design the feature, we have come to the position that it would be more prudent to drop it for the time being. String templates will not be a feature of Java 23, even as a preview feature.

Specification
-------------

Specdiff: https://cr.openjdk.org/~mcimadamore/jdk/8329948/v2/specdiff_out/overview-summary.html
Comments
Moving to Approved.
15-04-2024

Yes, as mentioned in the summary, this CSR covers both the API and the compiler changes (meaning both the changes to the compiler tree API, but, more importantly, also the language support).
12-04-2024

Moving to Provisional. I assume this CSR or another one will also formally remove the preview language changes associated with the prior JEPs too.
12-04-2024