News for hackers. Stuff that matters.
Re:New language features since Java 8 to 17 by pooya72 on Sunday October 24, 2021 @01:24PM (#28980021)
By multiline strings are you referring to text blocks? Those have been added to the language in Java 15: https://docs.oracle.com/en/java/javase/15/text-blocks/index.... .
Re:New language features since Java 8 to 17 by atomicnumber3 on Sunday October 24, 2021 @02:06PM (#28980420)
Oh, sorry, I know, I mentioned it specifically because it was "only" just added in Java 15 (which is basically "now" in Java timescales heh, and has only literally just now (with 17) made it into LTS AdoptOpenJDK releases, which also haven't quite landed on many distros package repositories, etc etc.). So for some weird value of "right now" Java still doesn't quite have multi line strings due to its newness.
Re:New language features since Java 8 to 17 by EdwardDiego on Sunday October 24, 2021 @10:14PM (#28983852)
Tbh I still crave Kotlins inline string interpolation.
Re:New language features since Java 8 to 17 by kaba0 on Monday October 25, 2021 @03:34AM (#28985303)
A “superior” implementation is in the works with templated strings.

It will look something like this:

STR.”text with \\{variable}”, but anything implementing the TemplatedString interface can change the behavior of interpolation. There is not even a requirement to produce strings only!

Re:New language features since Java 8 to 17 by EdwardDiego on Monday October 25, 2021 @04:22AM (#28985590)
Oh nice, do you have a link to the project?
Re:New language features since Java 8 to 17 by kaba0 on Monday October 25, 2021 @04:33AM (#28985675)
Re:New language features since Java 8 to 17 by EdwardDiego on Monday October 25, 2021 @05:43AM (#28985993)
Cheers!