DEV Community

Discussion on: Send me all the Kotlin questions you were too afraid to ask

Collapse
 
b0nuspunkt profile image
Bonuspunkt

What Problem(s) does solve Kotlin better than other languages?

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard • Edited
  • Kotlin is the child of JetBrains, a company that produces some of the best IDE, especially for Java.
  • So JetBrains obsession since its creation has been to understand how it can help programmers writing better software, to discover detect and fix all the common errors that programmers do. They have been very good at it, but at some point you reach the limit of what you can do in the IDE.
  • Why not integrate all this learning in the programming language itself? Well improving Java itself is seriously difficult, most of the things you should improve, you cannot for backwards compatibility reasons. Or you can reinvent a totally new language, but if you cut yourself from the massively important Java ecosystem, then it's not very attractive.
  • Can we have the best of both worlds? Yes. Jetbrains wrote a new language with a compiler that produces Java bytecode and is effortlessly compatible with the rest of the JVM ecosystem.
  • I think it was C++ inventor who said that you have two kind of languages: the ones people complain about a lot and the ones nobody uses. There is a lot of truth to this: think JavaScript (lots of flaws, very widespread) vs Elm (very nice language, few can use it). But the false dichotomy always made me sad. Can't we have more more well designed language that are also not confined to a niche? Well that's Kotlin.

What does Kotlin better than the others? It's not a single thing, there is no silver bullet as Frederic Brooks pointed out long ago. It's the compound effect of the lessons learned watching programmers do mistake, not being afraid to copy what other programming languages do well and having the expertise to do so (because jetbrains build IDE for many languages), being a practical choice, providing great tooling, being safe and concise, having good documentation, a very interesting community, and fixing a lots of small issues.

No silver bullet - essence and accidents in software engineering