5 ms·
I assume OP prefers Kotlin or Scala. Personally, I think one of my favorite things about Java is that, all things considered, it's a small-ish language. So I'm
by atomicnumber3 5y ago
I assume OP prefers Kotlin or Scala.
Personally, I think one of my favorite things about Java is that, all things considered, it's a small-ish language. So I'm glad that Java is both willing to evolve (slowly, letting other people try stuff out first) but also clearly focused on a curated feature set and resistant to letting new stuff in to bloat it. I am very happy to deal with minor things like no multiline string support if it means we get to avoid being a terrible mess of language features that ruby, scala, python, etc have accrued in a relatively quicker timescale.
I was fairly sad around the java 6-7 days where we went quite a long time with no visibly major new language features (diamond inference was 7's big thing, lol). So it is nice that we're moving a bit faster than that, now.
- pooya72 5y agoBy 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!