News for hackers. Stuff that matters.
Re:Java 21 VirtualThreads vs. Clojure Lazy Seqs (from Clojur... by haspok on Saturday October 07, 2023 @10:26AM (#37801962)
Null safety checks and if being an expression are major pain point resolvers that are still not available in Java (OK, maybe pattern matching helps the if-expression part, because pattern matching IS an expression in Java). Oh, and the legacy library APIs, which Kotlin elegantly wraps with FP-compatible classes. Instead of fiddling with streams (which also lack some basic operations, or have some not so nice API), you can just .map or .fold over your (read-only by default) collection. Not only less verbose, but also easier to use and understand. Having said this, these are fairly minor things, which may not warrant a switch to Kotlin, if you are otherwise happy with Java...

There are no comments on this comment yet.