3 ms·
Because that's what the cool kids use. After using Kotlin in Spring projects for a couple of years, I rewrote most of it to Java 17 and stick to Kotlin strictl
by 5e92cb50239222b 4y ago
Because that's what the cool kids use.
After using Kotlin in Spring projects for a couple of years, I rewrote most of it to Java 17 and stick to Kotlin strictly in Android work. It's not that much different anymore with all the recent additions to Java, and as Java progresses (and the main JVM implementation which is first and foremost being developed for Java) and diverges in other directions in some very important areas (value types, Loom), Kotlin starts to feel more and more like a second-class citizen. I mean, that's what some old-timers were preaching right here on HN from the very start.
Things like Hibernate require some pretty ugly (IMHO) hacks to work properly (you need something like three compiler plugins, and spread keywords around like there's no tomorrow).
The compiler was also very slow compared to Java. The same amount of code written in the same style took 2× times to build. This may have improved.
Probably the only thing I miss are nullability annotations (after getting used to them in C#, not Kotlin).
Edit: after re-reading what I wrote, the tone feels way too critical. Kotlin is a nice language, and certainly easier & more fun to both read and write (although it's trivial to write unreadable mess by going too far with its features). It just doesn't go far enough (for me) to warrant using a separate language with all that entails.
- throwaway2037 4y agoYou raise an interesting point: Maybe Kotlin was the push Java core devs needed to increase their rate of innovation ("release cadence"). I saw similar with Netscape vs IE, Chrome vs IE, Clang vs GCC, Boost vs C++ foundation library, .NET vs Java, Java+.NET vs C++, Node vs Deno. Kotlin can continue to experiment with new and interesting language features. Those that prove most popular can be adopted by Java. Also, as a secondary effect, since Jetbrains wrote Kotlin and had the best IDE, they had a head-start to build the community. That also helped to sell more IDE licenses. (I have nothing against this 1980s spy movie "master plan": They are great company with many great products.)