I’ve finally got around to learning Kotlin, a popular language best known for running on the JVM and competing with Java.
Interestingly, it is also working on “native” support for compiling to various machine-codes (eg x86, ARM). Most interestingly of all, it is working on compiling to WebAssembly for high-performance cross-platform applications.
My personal notes on Kotlin are available, but they are probably not of interest to anyone but me.
What might be interesting is that I recently converted a demo Spring/JPA program from Java to Kotlin.
- Java SLOC: 1368
- Kotlin SLOC: 1075
Change: (1075 - 1368)/1368 = 21% fewer lines of code
That’s not world-changing, but definitely worth having.
In general, I found the Kotlin version of this app easier to read, and less likely to have bugs. Programming was also more fun. I’ll be using Kotlin where possible in the future.