<html><body><div style="font-family: arial, helvetica, sans-serif; font-size: 12pt; color: #000000"><div>Hi Simon,<br data-mce-bogus="1"></div><div>This issue have re-discussed last month on amber-spec-expert<br></div><div> <a href="https://mail.openjdk.org/pipermail/amber-spec-experts/2023-April/003820.html">https://mail.openjdk.org/pipermail/amber-spec-experts/2023-April/003820.html</a><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>regards,<br data-mce-bogus="1"></div><div>Rémi<br data-mce-bogus="1"></div><div><br></div><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"interlink sg7" <interlink.sg7@gmail.com><br><b>To: </b>"amber-dev" <amber-dev@openjdk.org><br><b>Sent: </b>Friday, May 12, 2023 12:49:36 PM<br><b>Subject: </b>JEP 430: String Templates Mandatory TemplateProcessor<br></blockquote></div><div><style><!--
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Yu Gothic";
panose-1:2 11 4 0 0 0 0 0 0 0;}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.E-MailFormatvorlage17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:99.25pt 3.0cm 3.0cm 3.0cm;}
div.WordSection1
{page:WordSection1;}
--></style></div><div data-marker="__QUOTED_TEXT__"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><div class="WordSection1"><p class="MsoNormal"><span lang="DE">Hello,</span></p><p class="MsoNormal"><span lang="EN-US">I tried out the early-access build of JDK 21 and saw that the TemplateProcessor seems to be mandatory now for String Templates:</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"> var hello = "Hello \{name}"; ==> error: processor missing from template expression</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">The JEP says: "Thus if we forget to use a template processor such as STR, RAW, or FMT then a compile-time error is reported".</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">I know you dread this kind of discussion, but if that is the case, would we now be able to reconsider ${…}?</span></p><p class="MsoNormal"><span lang="EN-US">The original reason behind \{…} was to avoid conflicts with legacy code.</span></p><p class="MsoNormal"><span lang="EN-US">Using ${…} would require a tag on string templates (either a prefix or a delimiter other than "). See Alternatives section in the JEP.</span></p><p class="MsoNormal"><span lang="EN-US">However if the TemplateProcessor . TemplateArgument is mandatory it kinda acts as a tag anyway?</span></p><p class="MsoNormal"><span lang="EN-US">Backwards compatibility is still ensured as far as I can tell.</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Note that there is a very strong backlash against the backslash (play on words intended) in the Java community.</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Kind regards,</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US">Simon</span></p><p class="MsoNormal"><span lang="EN-US"> </span></p><p class="MsoNormal"><span lang="EN-US"> </span></p></div><br></blockquote></div></div></body></html>