My Thoughts on Kotlin: Perspectives after 4 years
tylerrussell.dev
My Thoughts on Kotlin: Perspectives after 4 years
1–10 of 12 posts
Re: My Thoughts on Kotlin: Perspectives after 4 years
#2Re: My Thoughts on Kotlin: Perspectives after 4 years
#3I'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.
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.
Re: My Thoughts on Kotlin: Perspectives after 4 years
#4I'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.
Re: My Thoughts on Kotlin: Perspectives after 4 years
#5Re: My Thoughts on Kotlin: Perspectives after 4 years
#6Re: My Thoughts on Kotlin: Perspectives after 4 years
#7Kotlin backend dev of 7 years here (never done Android). Here my 50 cents to some of the "bad" points: 1) tenary operator. Apart from the "if-else is an expression" defence there's also the fact the in Kotlin the '?' is linked to nullability, not only conceptually but also in regards to parsing Kotlin code. There's a video on youtube where the first Kotlin language designer said that he once - because so many people…
IME it’s not such a large shift for the developer (still easily recognizable as a ternary) while also having the benefit of slightly increasing the visibility of ternary expressions in the coding experience.
Edit: Thanks for the coroutine reading recommendation. I’ve been struggling a bit with them and have a few in use but would definitely like to grok them better.
Re: My Thoughts on Kotlin: Perspectives after 4 years
#8I'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.
Re: My Thoughts on Kotlin: Perspectives after 4 years
#9Kotlin backend dev of 7 years here (never done Android). Here my 50 cents to some of the "bad" points: 1) tenary operator. Apart from the "if-else is an expression" defence there's also the fact the in Kotlin the '?' is linked to nullability, not only conceptually but also in regards to parsing Kotlin code. There's a video on youtube where the first Kotlin language designer said that he once - because so many people…
In Raku the ternary was changed to ‘exp ?? True !! False’ to free up the single characters ‘?’ and ‘:’ for other purposes. IME it’s not such a large shift for the developer (still easily recognizable as a ternary) while also having the benefit of slightly increasing the visibility of ternary expressions in the coding experience. Edit: Thanks for the coroutine reading recommendation. I’ve been struggling a bit with th…
Re: My Thoughts on Kotlin: Perspectives after 4 years
#10I'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.
Im curious :) Why did you port the services from Kotlin to rust? Can you elaborate a bit on the reasons for the rewrite?