My Thoughts on Kotlin: Perspectives after 4 years

tylerrussell.dev

7 points

terussell85

14 hours ago


4 comments

narnarpapadaddy 2 hours ago

While the KMP story specifically is still pretty rough, supporting native and JS (or WASM) is becoming table stakes for new languages. Go, Rust, Gleam, even C all support some version of this. Now that there’s a common system API available across all the platforms, all the UI/database/network/whatever application libraries and frameworks can be unified as well. Multiplatform of today is closer to targeting different architectures (like x86 vs x64, which has worked since the dawn of time) compared to, say, Xamarin of yesteryear which abstracted over various native UI libraries.

BoardsOfCanada 13 hours ago

I've ported a lot of services from kotlin to rust. In my experience the kotlin code is about half the size of rust, and has about 200 mb + 2*x the memory overhead. Kotlin code probably takes about half of the time (or less) to write compared to rust as well, but you're not quite as sure that is it bug free as the rust code once it's done.

  • terussell85 13 hours ago

    That's a great point and I'm not sure why the memory usage/performance didn't come to mind when writing this.

    It's probably because, like most JVM related things, it fits into the "good enough" bracket. Most things running in the JVM are definitely not on the forefront of either CPU or memory performance.

    I haven't done personal estimates, but your 200 mb + 2*x estimate feels in line to what I'd expect when compared to "memory-tight" languages.

  • frnkng 11 hours ago

    Im curious :) Why did you port the services from Kotlin to rust? Can you elaborate a bit on the reasons for the rewrite?