Why I prefer Kotlin over JAVA

By January 1, 2018Blog

As we all know, back in IO 2016 Google announce its first class support to Kotlin for native android developmentand gave Android Studio an update to support coding in Kotlin. This doesnt mean that Google terminating or stopping support for Java and never quoted to stop in near future. Still JAVA is a very powerful language to work with and also the most popular programming language according as of the date(According to TIOBE Index) .

Then why to shift/migrate to Kotlin when JAVA is the best in the class. Well its not just about the popularity. See, languages that are build over this decade seems to be very human readable and easy to understand.

JavaScript, Swift, Python are very alike to what Kotlin offers. Writing boilerplate code again and again and maintaining those allover the project was a much of a headache while using JAVA. Specially when the project contains 100+ files.

Another major feature on Kotlin that lured me to towards it from the JAVA was the nature of the variables we define. We all know the mighty error named NullPointerException which arises when we try to use a variable which has null value. This caused many runtime crashes in the android app and who like it right? Now using Kotlin we can get rid of that(if used correctly). For beginners this might be an headache to learn but trust me once you understand it, you will never forget to appreciate it.

Also, JetBrains has recently announced Kotlin Native, which can be used to build cross platform native apps using Kotlin and is now currently available in Alpha. So this can also be the reason to learn Kotlin and make your career future proof.

If you have any more Kotlin features that I didn’t mention in the article, let me know in the comments section below.

Happy Coding!!!


Author awazgyawali

More posts by awazgyawali

Leave a Reply