Kotlin – a programming language, developed by JetBrains, the company from St. Petersburg, was announced an official development language for Android at the Google conference. And according to latest reports, a mobile development platform, Kotlin is expected to surpass Java as the primary programming language used for Android apps by December 2018.
So why Kotlin is so beloved by such an IT giant as Google among many other “young” languages?
Kotlin is a modern statically-typed object-oriented programming language, compiled for Java and JavaScript platforms. With full compatibility with Java, Kotlin provides additional features that simplify the day-to-day work of the programmer and increases productivity. Kotlin combines conciseness, expressiveness, productivity and simplicity.
There are seven major languages for mobile platforms today, but the balance of power is quickly shifting. Not too long ago, Swift didn’t exist. Now, it towers over Objective-C for iOS developers.
Android users are at the beginning of their own transition. With Java use peaking, Kotlin is on the path to winning the Android platform.
A little more about Kotlin
JetBrains began to develop Kotlin in 2010. The official release of the product was in 2016. The name was given after the Kotlin Island, near St. Petersburg. By an interesting coincidence, the name of the popular language Java is also the name of the island in Indonesia. Probably, the coincidence is not accidental. As reported in the press release, Kotlin should work wherever Java works, and one of the benchmarks was to make such a product that can be used in mixed projects that are created with several languages.
As the authors of Kotlin note, the most important thing for them was to create a “pragmatic” product. This means that they focused not only on eliminating errors and improving the product, which would be done by any programmer-developer, but wanted to make it a useful tool.
Why Google loved Kotlin
Google at the I/O 2017 Developers Conference in May last year had announced that Kotlin will be an officially supported language in Android. It would join the list of existing programming languages used for Android app development, such as Java and C++.
“Googlers” do not hesitate to describe this language as impressive and concise, which opens up more opportunities and is pleasant to work with. The programming code is on average 40% shorter than in other languages, and Kotlin allows you to avoid some errors in the code. One of the defining factors of the popularity of Kotlin in Google is that it is compatible with Java, which is already used in developing applications for Android.
Syntax
You can easily follow the idea of making a language that is equally convenient, both for beginners and experienced developers, in its syntax. Kotlin is extremely laconic, compact and understandable. A huge amount of code that you had to write in Java can now be ignored. It is approachable and it can be learned in a few hours by simply reading the language reference. The syntax is lean and intuitive. Kotlin looks a lot like Scala, but is simpler. The language balances terseness and readability well.
Now when programmers are starting to create a new application in the official Android Studio development environment, they can immediately enable the plugin “Kotlin support”. You can also convert already created lines of code in other languages to Kotlin, insert blocks in other languages into lines of code on Kotlin.
Benefits
• Kotlin solves problems faced by working programmers today.
• Kotlin costs nothing to adopt. There’s a high quality, one-click Java to Kotlin converter tool, and a strong focus on Java binary compatibility. You can convert an existing Java project one file at a time and everything will still compile, even for complex programs that run to millions of lines of code.
• The amount of code. You have no need to use archaic pieces of code which speeds up the development process and improves readability.
• Security. The rules of the syntax of the language make it possible to avoid small, difficult-to-trace errors;
• Compatibility with Java. This is convenient both for learning a new language, and for transferring your software products from Java to Kotlin.
In conclusion, it is worth mentioning that Kotlin adoption is exploding – the number of applications using Kotlin has grown by 125% on the heels of Google officially making Kotlin a first-class language for writing Android apps at Google I/O in May.
Kotlin is gaining popularity among Android developers at a tremendous speed. For example, in May 2017, before the Google I / O conference, Kotlin used 7.4% of developers, and by the end of September 2017 this figure had doubled to 14.7%.
Based on the latest data, if these rates will continue to grow with the same speed, then by December 2018 Kotlin’s share will make 51% of the market, that is, Java will lose its leadership and Kotlin will overtake Java in December 2018 – 17 months after Google announced official support at Google I/O. In contrast, it took 14 months for Swift to reach the same milestone versus Objective C for iOS app deployment.
So what is your opinion on that point? Will Kotlin replace Java in the nearest future? Please feel free to share your thoughts with us. Thank you in advance!
Just reading this in 2019. Great content. However, it seems Kotlin is yet to grow to beat Java number usages and popularity according to https://www.tiobe.com/tiobe-index/