Kotlin is to Java what Java is to C++
When Java came, it replaced C++ at a very large scale. Java was a higher-level language. It was portable (write once run anywhere). Automatic garbage collection rid the programmer from the burden of memory management. It had support built-in for multi-threading, string type, dynamic loading, etc. It had runtime checks for buffer overflow.
Overall, at the cost of some performance overhead, Java was a much more productive language for the programmer. In our age, computation power is getting increasingly cheaper and programmers are getting increasing costlier. Hence, in most use-cases, Java made more sense than C++.
As is the nature of progress, every new thing becomes old. As the levels of abstraction rose higher, Java started feeling too low-level. The new age of programmers never wrote code for memory management, buffer overflow, etc. anyway. What they felt was that Java requires a lot of boilerplate coding, e.g., creating dumb getters and setters. They also felt that Java requires too much effort for exception handling.
Kotlin is to Java what Java is to C++. Kotlin is a higher-level language. It has built-in support for properties so that the programmer does not have to write a lot of boilerplate for getters and setters. Kotlin has null built in to the type system and hence null-safety is much easier to achieve. Type inference and automatic casts make for more succinct code. There are many other "smart" features in Kotlin that programmers benefit from.
Kotlin is much more productive for the programmer. And in this case, the performance hit is almost zero. Hence, in most use-cases, Kotlin makes more sense than Java. It is also quite easy to pick up for Java developers. And it interoperates well with Java, so it isn't an all-or-nothing game. For all these reasons combined, I believe Kotlin will rise fast and go far.
Co-Founder at Pocket FM (Building Engineering Team- Hiring EMs, Data Science, BI, Backend & FullStack Engineers)
7 年kotlin is certainly highly productive as compare to java but it comes with some costs. Some nicely written articles on that: https://medium.com/@BladeCoder/exploring-kotlins-hidden-costs-part-1-fbb9935d9b62 https://medium.com/@BladeCoder/exploring-kotlins-hidden-costs-part-2-324a4a50b70 here's some benchmarking as well: https://sites.google.com/a/athaydes.com/renato-athaydes/posts/kotlinshiddencosts-benchmarks