logoalt Hacker News

dtechlast Sunday at 6:17 PM1 replyview on HN

Sort of true, but I often hear this take from Java programmers and it feels like "Blub" [1]/Stockholm syndrome to me.

Personally, I'm extremely glad to not have had to write .toStream().map(...).collect(Collectors.list()) or whatever in years for what could be a map. Similar with async code and exception handling.

For me one of the main advantages of Kotlin is that is decreases verbosity so much that the interesting business logic is actually much easier to follow. Even if you disregard all the things it has Java doesn't the syntax is just so much better.

[1] https://paulgraham.com/avg.html


Replies

wrathofmonadslast Monday at 12:14 AM

Java 16+

    stream.map(...).toList()
https://bugs.openjdk.org/browse/JDK-8180352
show 1 reply