4 ms·
Kotlin has the problem of "I had N problems, so I think I can create 1 new solution, now I have N+1 problems" (obligatory https://xkcd.com/927/ https://xkcd.com
by textlapse 2y ago
Kotlin has the problem of "I had N problems, so I think I can create 1 new solution, now I have N+1 problems" (obligatory https://xkcd.com/927/ https://xkcd.com/927/).
The 'money/percent/usd' are almost like new keywords - which to me seems bad. Why not a formatter or another tool that simplifies but doesn't make it too clever or worse, hard to read.
Kotlin is really cool and arguably better than Java. But the language is very hard to read ('easy' to write). And with so many different ways of doing a single thing (and many of them exist to support Java, I understand) plus new 'macro-like' things expanding the language automagically makes it very hard to grasp.
I hope I am not the only one with this same feeling...
- occz 2y agoI think one clear tradeoff that Kotlin - arguably intentionally - makes, is that it's harder to work with than other languages without the use of an IDE. It is after all made by an IDE developer. It's also quite a bit more liberal in introducing new features than Java is, and with a larger feature surface there's more potential for misuse. On balance, I think using Kotlin over Java is worth it, though.
- dakiol 2y agoSame feeling. It’s rather painful to read Kotlin code because of so many features that imho are not really that needed… and every developer wants to use them all.
- jeroenhd 2y agoKotlin has a few new features (infix operations for instance) but most of its feature set is stuff other languages have had for years, sometimes decades, written down a little bit differently. There's no functional difference between lambdas in Kotlin and Java, class extensions have been in C# for ages, and operator overloading has been a thing for decades. Most of the resistence to Kotlin I see seems to come down to "I don't know the syntax and that makes it hard for me to understand the language" or "this isn't like the language I prefer". Kotlin actually brings surprisingly few language features to the table, its API is just very effective at making use of the few new features it brings as opposed to the ossified languages from a few decades ago that offer new features but then decide not to make use of them in the standard library in case a programmer doesn't like using part of the language. Criticising Kotlin for using things like infix operators or lambdas is like criticising Java for shoving classes and generics down everyone's throat. You can write Java with only minimal use of these, but you'd end up with a weird, non-standard code style for the language. There are still plenty of programmers around that despise the concept of classes or inheritance and will declare any Java/C#/C++/Javascript/Go program unreadable for making use of OOP concepts, not dissimilar to the "I don't get Kotlin" people that seem to have been tricked into believing Kotlin is supposed to look like Java.
- alleskleber 2y agoWhen we first started using Kotlin, it was like you said. The devs were eager to try all the new possibilites and apply them wherever possible. Resulting in sometimes needlessly complicated solutions. After the initial excitement faded, everyone is now much more conservative. Kotlin is still very much appreciated by pretty much everyone. But now sometimes I even have to remind a coworker when there's a language feature or a built-in collection function that might help them.
- ttymck 2y ago> Kotlin is really cool and arguably better than Java. But the language is very hard to read ('easy' to write) I had the same immediate reaction. This style of code is something the Scala community used to be in love with, and was criticized for it. The community has largely moved away from this style, so it's interesting to see history possibly repeating itself with Kotlin.
- vips7L 2y agoIt feels so lambda and extension function heavy.