Kotlin is to Java what Java is to C++

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.

Prateek Dixit

Co-Founder at Pocket FM (Building Engineering Team- Hiring EMs, Data Science, BI, Backend & FullStack Engineers)

7 年

要查看或添加评论,请登录

Vijay Aggarwal的更多文章

  • Past, Present, and Future of Software Engineering

    Past, Present, and Future of Software Engineering

    I recently completed 15 years in my career. I naturally looked back and wondered how much I have evolved over this time.

    7 条评论
  • Not all IDEs are the same

    Not all IDEs are the same

    Disclaimer: I do not intend to write a detailed comparison. I am only sharing my experience with an intent to encourage…

  • Effective Disagreement for Strong Teamwork

    Effective Disagreement for Strong Teamwork

    We live in an increasingly connected world, and therefore increasingly engage with diverse people. Diversity brings in…

    2 条评论

社区洞察

其他会员也浏览了