Comment by stanac
5 days ago
After ~13 years of working with C#, I moved to Kotlin. It's such a beautiful language. When I have to read docs for a Java lib I realize why I like Kotlin.
I want to say culture around Java doesn't have to change, new culture is growing around succinctness (if not simplicity) of Kotlin, and it gets most of the benefits of Java ecosystem.
I also like Kotlin. The readability is awesome. ;)
I get the snark, but also - there is this "ideal Java code style" that most experienced devs tend towards. Unfortunately I don't see anything like that for Kotlin (yet?), and there are a bunch of patterns that I really dislike. I sometimes feel people just toy around, like "wow I can make this into an extension method, how cool" and leave that as the code.
In general, I really dislike extension methods, especially when paired with tiny objects with barely any functionality to begin with. Like people build a mental model of what a thing is based on how can it be used - but if you leave that empty and put every behavior at different files in the form of extension methods you make this understanding very hard to build up.
Add to it that it removes polymorphism and often actually hinders readability.. so my point is, having more ways to write code is not necessarily a positive.
I must say I prefer C# over Java. They're pretty similar in a lot of ways, but LINQ is much nicer to use than the Java streaming equivalents. And there are some odd warts like Java lacking unsigned types.