Why Kotlin is great? We used Kotlin for some of our projects, but haven’t a chance to explore all of its delightful advantages. So now we found a material where all of them are collected. We wish we could use this language more often!
So here’s a couple of reasons why we (and you as well) would love to use Kotlin:
- Kotlin is 100% interoperable with Java. All your favorite Java frameworks are still available
- Kotlin’s syntax is familiar to any programmer coming from the OOP domain. But there are some differences from Java such as the reworked constructors or the
(However, we have some thoughts on functional programming you might want to hear also).
- Kotlin will infer your types wherever you feel it will improve readability
- The Kotlin compiler tracks your logic and auto-casts types if possible
- You can stop calling
equals()explicitly, because the
==operator now checks for structural equality
- The switch case is replaced with the much more readable and flexible when expression
- It’s a POJO complete with
copy(), and unlike in Java it won’t take up 100 lines of code
- The standard library extends the functionality of Java’s original types
- Types are non-null by default and can be made nullable by adding a
- Method parentheses can be moved or omitted if the lambda is the last or the only argument of a method
There are other interesting features that you can find here.
You could also find it interesting to take a closer look at the brief history of programming languages in different periods of time.