Will Kotlin Be The End Of Java?

On May 17th of this year at the Google I/O keynote, the Google Android team announced that Kotlin is now the official Language for Android development. Developers have been using Kotlin to build Android apps in previous years but Google just announced a  first class support for it. Now let me give a brief history of Kotlin.

Kotlin is basically a statically typed programming language that runs on Java virtual machine JVM that was first announced in July 2011 but was released to the public in February 2016. it was called “Project Kotlin” it was created by a team of JetBrains programmers that is based on Saint  Petersburg Russia the name Kotlin comes from Kotlin Island in Saint Petersburg.

What Makes Kotlin Better?

Both Kotlin and Java can be used to build Android apps but since the release of Kotlin you might be wondering why you should switch programming languages? well, Kotlin was designed to fix some issues Java had and make code learning easier. these are some of the issues Kolin help fix:

  1. Kotlin typed system is set to eliminate the NullPointerException‘s  from the code
  2. Kolin is designed to be flexible and easy even Java code can be called from it
  3. There is an Array class with a get and set functions alongside a few other functions.
  4. A function can accept another function as a parameter
  5. There are no checked exceptions on Kolin.
  6. Kotlin code is concise and  portable compared to Java
  7. you can use existing Java libraries for JVM, browsers and Android development on Kotlin

What Other Applications Can You Build with Kotlin?

  1. JVM: You can develop server side applications with Kotlin just as you can do with Java, with frameworks like Spring, Vert.x , Ktor, etc. and can also be deployed by any host application that supports Java web applications like Amazon web applications, Heroku, and  Google cloud platform.
  2. Native Applications:  Kotlin can build native applications with an existing Java code.  You couldn’t build native applications with Kotlin not until recently.
  3. JavaScript: Kotlin provides the ability to target javascript and it does so by transpiling Kotlin to JavaScript.

 

 

What happens to Java and should you switch to Kotlin?

Java is not going anywhere at all even though Kotlin is now has first class support for Android dev. There is more to Java than just Android dev and if you want to be an android developer and you’re new to programming, in general,  I would still suggest you start with Java and once you feel comfortable enough you can then move to Kotlin that way you will have a much deeper understanding on android dev and also in case you run into a Java code inside a Kotlin project and also Kotlin is fairly new and somewhat dependent on Java since it runs on Java virtual machine.

In conclusion, Kotlin is a great programming language that was built to resolve many problems in Java and other object-oriented programming languages. it’s reliable, flexible, compatible and very easy to learn and every Android developer should get familar with it because Kotlin is the future of Android development.

Reference: https://kotlinlang.org/

Leave a Reply

Your email address will not be published.