Kotlin! The most beautiful child of JVM (Java Virtual Machine), the very newest programming language and most importantly the experienced programmers fall in love with it. Kotlin teach me one thing, you can defeat the king if you have something is your own. I personally love Kotlin. There are lot of things to fall in love, which can make your code more readable more efficient, more time can be save, more comfort you can achieve.
Brief History of KOTLIN
In July 2011 JetBrains unveiled Project Kotlin, a new language for the JVM, which had been under development for a year. JetBrains lead Dmitry Jemerov said that most languages did not have the features they were looking for, with the exception of Scala. However, he cited the slow compile time of Scala as an obvious deficiency. One of the stated goals of Kotlin is to compile as quickly as Java. In February 2012, JetBrains open sourced the project under the Apache 2 license.
JetBrains hopes that the new language will drive IntelliJ IDEA sales.
Kotlin v 1.0 was released on February 15, 2016. This is considered to be the first officially stable release and JetBrains has committed to long-term backwards compatibility starting with this version.
Present of KOTLIN
After google announced Kotlin as Androids primary programming language it’s demand increase incredibly. Experienced java programmers also appreciate it’s terminology. Many experience java programmer already start using Kotlin rather than Java. With Android Studio 3 Kotlin will come with full features and supports. No external plugins will need.
In this article I want to explore some pros that why kotlin is better than java and why one android developer must learn the new programming language.
It’s Easy to Start with Kotlin
Kotlin comes with the newest and more readable syntax. It’s not use the old C style syntax. It will take 7 to 10 days to an experienced programmer to capture all the syntax. It is new and at the same time it is familiar.
Less Code More Job
One of the best feature of Kotlin is it has no boilerplate code. You just have to type only few code to make your job done. All necessary code that we need in Java will be typed by the compiler itself. There is an awesome class called data class, we don’t have to type all the getter and setter for our member variables. Even we also din’t have to override toString and hashCode too. There are lot. I will write several article on Kotlin features.
Expression is Awesome
In Kotlin if else blocks is not only block. It is expression even function which is called method in Java is also can be written as expression. So we can return data directly from it without assign a variable. And there is an awesome feature called “when” which is really awesome.
Kotlin provides a rich set of library along with Java. We can use all the library we have with java and we also have kotlin library.
Functional Programming Support
Kotlin supports full functional programming with zero overhead lambdas and ability to do mapping folding over standard java collections. The Kotlin type system distinguish between mutable and immutable objects.
No Null Pointer Exceptions:
Experienced programmers know the problem with null pointer. Kotlin is very smart to deal with null objects. We don’t have to worry about Null Pointer Exceptions anymore.
There are lot of features Kotlin comes with. If I want to write all I need to publish a book. All main feature I have discussed here is enough to understand why kotlin is best. There also many feature I can’t cover right now. I will describe one by one in my later articles. In my perception Kotlin is awesome and it will get attention from all experienced programmers. Novice android developer should learn it. Because it will reduce more complexity. If anyone found any wrong information in my article feel free to inform me.