There has been a lot of buzz surrounding Kotlin for a couple of months, although it has been around for quite some time. In fact, the project started in 2010 and was open source almost right off the bat. However, the official release didn’t take place until February last year.
Designed by JetBrains, Kotlin is a programming language that runs on the JVM (Java Virtual Machine). This means that you can use it along with several other JVM languages that are geared towards Android development.
Google’s official support shouldn’t really come as a surprise as it’s the same company that develops JetBrains IDE for Android Studio. It’s also supported by other major Java IDEs like the following:
Check out a related article:
- IntelliJ IDEA
Furthermore, the command line compiler can be utilized to enable straightforward support for running and compiling applications. When you use it, Kotlin might also feel a little familiar if you have used Swift before (but in reality Kotlin predates Swift by almost four years).
So what’s all the fuss about? Let’s take a look.
1. Some developers think Kotlin will replace Java
For some reason, people have started to think that Kotlin will replace Java. I guess it’s because Java is old now and some engineers were on the look out for something new.
It’s a lot like Java in structure and you can easily convert all existing Java code into Kotlin (Code > Convert Java File to Kotlin File). So even if you’re not comfortable with Kotlin, you can still code in Java and convert later.
What’s quite beautiful is the fact that you don’t have to deal with generating boilerplate code. Instead of having over 50 lines of Java code, you can now cut it down significantly to one or two lines in Kotlin.
Further, you won’t have to deal with the nightmare that goes hand in hand with the way Java handles null. But just because Java is old and somewhat error prone, it’s difficult to fathom it being replaced rapidly. This is because Java isn’t just a single language, it’s part of a much larger ecosystem.
Check out a related article:
2. Less code = Less bugs = Less time
You can be sure to save a lot of time during the development cycle as less code means you’ll have fewer bugs to deal with. This also means that you will be accomplishing your tasks a lot faster which, in turn, can save you a significant amount of time.
This means that Kotlin can also have a positive impact on your bottom line as most software teams calculate costs based on project hours. So it’s perfectly natural to see Android developers get quite excited over this programming language.
3. The Google vs. Oracle Java wars
Some people in the industry are also theorizing that this is a bold move by Google to take on Oracle. It’s no secret that the battle over Java has been raging on for several years now, so it can make a lot of sense.
With a sizable portion of Java’s market share in Android development, it might well be Google making a statement. But for right now at least, we are just left to speculate.
There are many other reasons like the fact that every class is a function and vice versa in Kotlin. Additionally, Kotlin for Android has Optional types, so it’s a type-safety language that’s helped by all the safety check-ups.
We can assume that all the fuss is coming out of the Android community because Swift for iOS will get you more bang for your buck. Java development may have had its problems, but you can bet that it’s not going anywhere anytime soon.
It’s probably safe to assume that Kotlin will go through an accelerated period of evolution over the coming years, but it’s anyone’s guess if this excitement will last (but for now, I’m thinking it will).
Featured image source: redbubble.com