i mean, it follows the java philosophy (preseving backward compat). theyve done great work improving java. but i see no reason to use it over scala where i get better features, its more like a java 2.0
Then don't. You can use Scala to your heart's content. No one is stopping you.
I had to work on a Scala codebase at some point, and I thought it horrible. I judge a language on how easy it allows you to create an unreadable mess. Scala makes it incredibly easy. And the people that enjoy Scala seem to like "unreadable messiness" as a feature.
I found it fun to learn the basics, and it was interesting to think of problems from a FP approach, but it is never something I would use in the real world.
I vastly prefer Java. The features it imported from Scala were fine, made the language better. It doesn't need to import everything.
In pretty common applications, virtual threads will make the difference between chaining futures (this.then(that).then(...)) vs not, all throughout your code. Or some frameworks had far uglier ways to deal with cooperative multitasking.
Lambdas weren't simple to shoehorn into Java. But most of the recent changes have been implemented as well or better, or as well as you could imagine while maintaining backwards compatibility and Java-ness.
Records/sealed interfaces (ADTs) are quite clean.
Text Blocks are better in Java IMO. The margin junk in Scala is silly.
Saying that the new Java features are half baked, to me, shows you're just feeling hurt because people prefer Java over your favourite language.
Java may not be the pinnacle of programming languages, but since Java 8, pretty much every feature it's added has been absolutely excellently done.
i mean, it follows the java philosophy (preseving backward compat). theyve done great work improving java. but i see no reason to use it over scala where i get better features, its more like a java 2.0
Then don't. You can use Scala to your heart's content. No one is stopping you.
I had to work on a Scala codebase at some point, and I thought it horrible. I judge a language on how easy it allows you to create an unreadable mess. Scala makes it incredibly easy. And the people that enjoy Scala seem to like "unreadable messiness" as a feature.
I found it fun to learn the basics, and it was interesting to think of problems from a FP approach, but it is never something I would use in the real world.
I vastly prefer Java. The features it imported from Scala were fine, made the language better. It doesn't need to import everything.
1 reply →
Cause it actually needed lambdas and things that go with it. Didn't need all the Scala-specific data structs like Array.
And the most important thing Java was always missing until recently, virtual threads, were lacking in Scala too.
Virtual threads is a JVM & stdlib feature, not a language feature.
(And I'd disagree that virtual threads were all that important compared to language features.)
In pretty common applications, virtual threads will make the difference between chaining futures (this.then(that).then(...)) vs not, all throughout your code. Or some frameworks had far uglier ways to deal with cooperative multitasking.
Lambdas weren't simple to shoehorn into Java. But most of the recent changes have been implemented as well or better, or as well as you could imagine while maintaining backwards compatibility and Java-ness.
Records/sealed interfaces (ADTs) are quite clean.
Text Blocks are better in Java IMO. The margin junk in Scala is silly.