3 ms·
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/i
by pooya72 5y ago
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.html https://docs.oracle.com/en/java/javase/15/text-blocks/index.... .
- atomicnumber3 5y agoOh, 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.
- EdwardDiego 5y agoTbh I still crave Kotlins inline string interpolation.
- kaba0 5y agoA “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!
- EdwardDiego 5y agoOh nice, do you have a link to the project?
- kaba0 5y agohttps://openjdk.java.net/jeps/8273943 https://openjdk.java.net/jeps/8273943
- EdwardDiego 5y agoCheers!