TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Java: Update on String Templates (JEP 459)

4 pointsby lichtenbergerabout 1 year ago

1 comment

exabrialabout 1 year ago
I don’t want to piss on anyone’s hard work… I just do not like the proposed syntax for string templates.<p>STR.” doesn’t make sense. STR looks like a constant. . Looks like a function call or field access, and “ shouldn’t follow period. Recycling these characters is just hard to grok.<p>And the API just leaves too much of the language to upend imho. There’s a reason why Java doesn’t do things like operator overloading… it’s a cool party trick but in the long run it does more harm than good on codebases you werent the sole author on.<p>How about a new string delineator and use the \{brace} format and we call it good? Super easy and IDE support would be a snap too.<p>I just feel they’re reaching for too much. But i DO appreciate they’re taking their time. Java is one of the last bastions where people are doing real effort into maintaining backwards compatibility.