News for hackers. Stuff that matters.
Re:Java 21 makes me like Java again by kaba0 on Sunday September 17, 2023 @06:31AM (#37543519)
The kind of Turing completeness certain type systems have is useless beside academic curiosity - look at the vavr library, that’s what I’m talking about. You can have plenty Haskell types without any hacks, except for Monads in Java.
Re:Java 21 makes me like Java again by javcasas on Sunday September 17, 2023 @07:06AM (#37543727)
> vavr - turns java™ upside down

"turn X upside down" are different words for "use X contrary to its original intention and design".

You will find very few people willing to let go what people undestand as Java so as to be able to do Haskell-in-Java.

Re:Java 21 makes me like Java again by kaba0 on Sunday September 17, 2023 @07:11AM (#37543756)
It’s goddamn immutable collections and Optionals, not brain surgery come on.

It’s not like Java hasn’t been going in the same direction, see records, sum types, pattern matching.

Re:Java 21 makes me like Java again by javcasas on Sunday September 17, 2023 @08:01AM (#37544116)
Yes, it's goddamn immutable collections and Optionals.

People still hate it because it's immutable, therefore you can't do hashmap.add(), and it's hard because they can't randomly return nulls, and it's slow because the hashmap now takes o(log n) always instead of o(1) sometimes and o(n) other times.

People hate it because it's different to the Java they learnt 20 years ago, that they claim is exactly the same as today.