Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by lanna on Friday March 03, 2023 @01:31PM
(#35013323)
Are they trying to make Scala look more complicated than the other languages on purpose? The Scala example f"$x%d plus $y%d equals ${x + y}%d" could be written simply as s"$x plus $y equals ${x + y}"
[ Parent
| on HN ]
Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by geodel on Friday March 03, 2023 @02:02PM
(#35013644)
Yes, Java is legit scared of Scala's rising popularity.
Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by AtlasBarfed on Friday March 03, 2023 @03:49PM
(#35014808)
If anything Java is becoming groovy. Almost all features adopted are groovy features.
Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by oblio on Friday March 03, 2023 @04:06PM
(#35014983)
Is Scala rising? It used to be hyped a ton back in the earlier Twitter days, about 10 years ago, but since then, everything has been quiet.
If anything, Kotlin is probably ahead of Scala now, adoption wise.
Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by avgcorrection on Friday March 03, 2023 @04:54PM
(#35015578)
Wait. Did we just get teleported back to 2018?
Re:JEP 430: String Templates (Preview) Proposed to Target Ja...
by isbvhodnvemrwvn on Friday March 03, 2023 @05:41PM
(#35016022)
Sarcasm carries poorly over text :)
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.
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.