Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by ndriscoll on Friday March 03, 2023 @02:11PM
(#35013742)
It's funny too because the Scala ecosystem has had safe string interpolation for years. e.g. with Slick sql"SELECT * FROM Person p WHERE p.last_name = $lastName" will produce a parameterized query/prepared statement that you can run, and it does this at compile time so runtime injection like log4shell is impossible.
[ Parent
| on HN ]
Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by optician_owl on Saturday March 04, 2023 @01:42AM
(#35018774)
One of the best application I've seen is structured and contextual logging [1]. Combined with implicits, this allows you to require a right renderer or/and automatically get a current state of an execution context.