String Templates - Syntactic sugar or useful improvement? by MICHAEL KRIMGEN

Опубликовано: 24 Март 2026
на канале: Devoxx UK
172
1

For updates and more, join our community 👉   / devoxx-united-kingdom  

Java 21 introduced string templates as a preview feature (https://openjdk.org/jeps/430). String interpolation
exists in many other languages and several libraries already offer string interpolation for Java. With Java 21, string templates
become part of the language. Is it only syntactic sugar or a useful improvement?
In this session, we'll look at the details of the JEP. The talk will cover the reasoning behind the new feature,
what are the advantages and disadvantages, performance impacts. We'll also see how to implements a custom template processor.
The session will also include some live coding and a short discussion with the audience on their opinion on the new feature.