Why is Kotlin not among the most used languages?
Does it still have a promising future or is it not?
Kotlin is among the most used languages.
It depends on where you look.
Why anyone would do development in Java instead of Kotlin is one of the greatest mysteries… Only explanation I have is that people like carpal syndrome and bloated code, so they stick with Java.
I’ve been using exclusively Kotlin for the past year, and unless someone beats me with a baseball bat, I won’t develop in Java ever again.
I don’t know about you, maybe you are Vim masochist or something, but I don’t really feel like I do all that much more typing in Java than Kotlin when using a modern IDE like IntelliJ. I type 4-5 chars, autocomplete, Ctrl-V to create final var {something}
and presto. With Java’s record
you finally also have a struct-like class like in Kotlin, so verbosity for those “data-holder” cases is a thing of the past.
And TBH, typing has never what held me back from completing features. It’s my brain that’s the slow part
The biggest pain points about Kotlin is that it is still rife with children’s diseases that make life less enjoyable. After introducing Kotlin, we have had issues with
- plugins needing updating to be able to handle Kotlin
- much slower builds (just adding a handful of Kotlin classes increased build time by a minute or more)
- randomly failing flaky tests when touching Kotlin code (
NoClassFoundException
)
This is all (probably) fixable, but when going from a relatively painfree and super-fast pipeline to adding those issues you don’t get immediate puppy-love affection for Kotlin, even though the language in itself is beautiful.
I have been using kotlin for the last 3 years. In the beginning i was super impressed. But not anymore.
When it comes to readability I think still Java is easier to read. Many kotlin decelopers seems to overuse scope functions, elvis operator, chaining etc.
I still do not understand why elvis operator is more readable than a normal if statement.
In Android it has become the preferred programming language, but I doubt that we will see it taking any market share in backend for example
I too have been using Kotlin for about 3 years now. I dread having to go back. The projects I’m involved with are multiple parts that work together, and I get away with doing my turf in Kotlin, but I have to write some Java to make it work on the other end. My Kotlin side is so much more efficient and smarter than the other clunky wonky Java end. It isn’t about a bit of elvissing, scoping, or any other candy stuff. It’s about becoming motivated to think smarter using more mentally efficient constructs. The way I end up thinking code is different than before. I literally massage code around now. I can evolve and home in on ever smarter constructs. Java is like molasses that way. Java doesn’t at all encourage me to massage things around and evolve to improved makeups. With Java it’s more like “woof, no that that unpleasantry is over it, can I do something else?”… It’s like boilerplate city, but then instead of OS boilerplate, language boilerplate. Molasses.
Kotlin has not overtaken the world, but it is one of the most used languages. However, I’d wish Kotlin would be a bit higher in the rankings (somewhere in the range of Swift and C++), but in the Kotlin is popular enough so that I’m not worried about its future. Besides the obvious Android, frameworks like Spring Boot and Quarkus are also providing native Kotlin APIs these days, which I consider a good sign.
…, but I doubt that it [Kotlin] will take any market share in backend, for example.
I think that this has more to do with extreme conservative companies. For example in my last company I was writing an isolated component in Kotlin instead of Java. I got beaten to the grounds by the same people that nourished the usage of groovy for tests and all that in the same project.
In my new company, we have at least dozens of developers who know about Kotlin, but still nobody would dare to write any component in Kotlin, let alone rewrite legacy components in Kotlin.
I have finally decided to do a moderate sized project with Kotlin backend in my freetime.