logoalt Hacker News

dionianlast Wednesday at 4:14 PM3 repliesview on HN

then why is java adding back half baked versions of scala features every major release


Replies

brabellast Wednesday at 6:40 PM

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.

show 1 reply
morshu9001last Wednesday at 4:52 PM

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.

show 1 reply
EricRieselast Wednesday at 5:44 PM

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.