2 ms·
The future is always a bit uncertain. But Kotlin's future actually looks pretty good to me. This article looks like the author is not really clued in to the mas
by jillesvangurp 3y ago
The future is always a bit uncertain. But Kotlin's future actually looks pretty good to me. This article looks like the author is not really clued in to the massive amount of progress and change happening especially in the last year. There's nothing wrong with being a bit old an conservative and stuck in your Java ways. Been there done that and trying to be better than that now. But this article is just a bit overly dismissive and poorly argued.
I'm biased of course having used Kotlin extensively for the last six years and having made the switch from Java. From my perspective It's simply a much better Java. And I have 25 years experience with that, mostly server side.
And the way I'm using it, it's also a better Typescript for me. If you have trouble parsing that last bit, I'm using kotlin-js to develop frontend code. It's actually really nice for that even though not many people do this. Well worth a look if you are getting tired of dealing with Javascript's idiosyncrasies (which typescript inherits) and a bit jealous of what all the cool kids doing mobile applications are using. Which would be using fancy Kotlin and Swift UI frameworks mainly.
Kotlin-js being nice to use should not be that surprising because of course a lot of Android developers use and love it and a lot of the libraries and practices port over very well to the web if you use kotlin-js. E.g. I use dependency injection (koin); which as it turns out is equally useful and nice to have in a browser as it is on Android and in Spring or other places.
There are a few changes happening this year with Kotlin that are exciting for Kotlin users and interesting for people not yet using it:
- Kotlin native is stabilizing. It now works well on IOs, Android, Linux, Windows, and MacOS. It's not "just another jvm language" anymore. The multiplatform library ecosystem is really starting to thrive. Lots of growth there. Especially in the last year. And I maintain a few myself.
- The web assembly compiler is now available in an alpha version and browser support for garbage collection in WASM just rolled out in Firefox and Chrome a few months ago. This is required by Kotlin's wasm support as it does not bundle its own garbage collector. Safari should follow soon/eventually. This means you can now use kotlin-wasm in a browser without having to fiddle with feature flags in your browser. Multiplatform library support for this is still a bit a work in progress but most kotlin multi platform libraries should start having wasm targets in the next few months. Wasm works in servers and on servers, lambda functions, and edge networking. So, first class Kotlin support for wasm is a big deal and the whole kotlin multi platform library ecosystem is coming along.
- Kotlin 2.0 is in Beta currently and should release in a few months (spring?). Kotlin native and wasm support and that are all happening at the same time and come on the tail end of a years long effort to re-engineer the compiler and IDE toolchain. Work on Kotlin 2.0 actually started about three or so years ago and it has included a gradual rewrite of the compiler through the 1.6-1.9 releases.
- Building on all this is Compose multiplatform, which brings Google's Jetpack Compose to other platforms. That's currently stable for a few platforms, in alpha versions on others (like IOS and web). That's something that should stabilize towards the end of the year. We'll have a cross platform, natively compiling UI framework that is usable across web (wasm), IOS (native), Android (native) and the three Desktop platforms (jvm, for now). So, that could end up being a nice alternative to things like flutter and react-native. Or indeed to packaging up web applications as PWAs or using things like electron.
It might not be everybody's cup of tea but that's a lot of progress that came together in the last year. I use other languages besides Kotlin. So, I can appreciate other languages as well. But Kotlin is just really nice.