Is Kotlin the future of Android?

Is Kotlin the future of Android?

Recently Kotlin is making a dizzying career among developers, creating an application for Android. In May, this programming language gained an important ally when Google announced that Kotlin becomes the official language for Android. Will it be he, and not already flying Java, will be the future of the world’s most popular system for mobile devices?

May 17, 2017 will probably be a landmark date for the Kotlin language. It was on this day during Google I / O 2017 that it was announced that the mentioned programming language will become the official language for the Android platform. On the one hand, support from such a tycoon as Google is a real nuclear weapon in the dispute between Kotlin and competitors, and on the other – an incentive for developers to switch from Java to Kotlin, which many of them have refrained from until now due to the uncertain future of the Kotlin language. Now this future has become much brighter. Although there was no acquisition by Google of JetBrains, which created the Kotlin language (a horse in a row to anyone who can rule out that this will not happen in the future), but it was announced even closer cooperation between the two companies in the development and promotion of the Kotlin language. By the way, the two companies have been working closely together for a long time. JetBrains is, among other things, the creator of IntelliJ IDEA, on which Android Studio is based. In any case, it was announced that a non-profit foundation will be established to support the development of the Kotlin language, and the tools of the latter will be included in Android Studio 3.0. This means that developers will not have to bother installing any additional software to create Android applications in Kotlin. Already now many people refer to it as Swift for Android.


A few numbers to start with

Kotlin did not appear out of nowhere like Deus Ex Machina, it has already been used by companies such as Pinterest, Basecamp or square. But now it is much bolder to say that this language began to conquer Silicon Valley, and with it the whole world. It is worth noting that Kotlin is not only related to Android, it also works with other technologies, for example, it is designed to work as native code on Mac computers with iOS, it is compiled in JavaScript for creating websites, etc. However, only the official support of Google has become an effective impetus in the promotion of the basin. Not surprisingly, if you look at IDC data, it turns out that 85% of smartphones on the market run on Android, while the iOS system of Google’s biggest competitor, Apple, supports only 14.7% of phones, while other platforms have only a negligible market share. The announcement of the official language of the most popular system on mobile devices has become for advertising basin invaluable. This had a huge impact on the popularization of the language, but it is not that it has not gained followers before. In the ranking of RedMonk Kotlin was on the 65th place in 2016, to climb to the 50th place in January. After the announcement of the decision by Google, he moved up to the 46th position. We also find it in the GitHub rankings (39th place) and Stack Overflow (60th place). Kotlin is increasingly called a rising star in the TIOBE index. Back in May, he took 80th place, and already in the last, August ranking was on the 41st position. Is it just fashion? However, Kotlin has more to offer.


Advantages of Kotlin language

Kotlin is a language developed by JetBrains (one of the most dynamic software brands, the developer of PhpStorm, PyCharm, etc.).) and by the open-source community. The name was inspired by an island located near St. Petersburg. The beginning of the project related to the Kotlin language dates back to 2011. JetBrains chief programmer Dmitry Zhemierov explained that most of the existing languages do not have the features that JetBrains and other developers need. A year later the Code of the basin was opened under the license Apache 2. Developers from St. Petersburg hoped that the confusion around the new language will increase sales of IntelliJ IDEA. However, it was necessary to wait a bit for the first stable version of the Kotlin language. It appeared only on February 15, 2016, and therefore quite recently. Many developers quickly drew attention to the strengths of this language.

Undoubtedly, the great advantage of the basin is its brevity in comparison with Java. In the latter, you often need to write many lines of code to perform the simplest tasks (for example, storing fields and providing access to them). In the basin we have a completely different philosophy. Here the emphasis is on the code being as simple and as short as possible, the syntax is concise. In this language, we can find many features such as default attribute values, data classes (data storage and basic access to them), delegates or references after names in functions. You can also see some .NET inspirations there, like translating getter and setter navigation or dynamic typing . Kotlin also has support in the form of very good tools, starting with IntelliJ, and ending with plug-ins for environments such as eclipse and NetBeans. A big advantage is also the increased reliability of the application and dealing with the null problem.


Kotlin a

Kotlin has also been loved by many programmers for its handling of nulls, especially NullPointerException, which is one of the most common errors encountered in Java. Sometimes it is a simple bug that is easy to fix, but sometimes it can spread the entire application. In the basin there is no problem with this. There are mechanisms in place to prevent accidental access to null values. Here, all types can no longer accept null values by default. This allows you to detect the problem already at the build stage, and thus avoid critical errors known from Java. Of course, in Kotlin we can assign null to a variable, but it is necessary to add a question mark to its type.


The golden future of the Kotlin language?

It is important that Kotlin is not a problem for those developers who are attached to Java and do not intend to completely abandon it. The language developed by JetBrains and the open-source community has another huge advantage: it is fully compatible with Java. It can easily use its frameworks and libraries, you can use the Kotlin language in already started projects without having to modify what was written in Java. For example, you can change only one class to Kotlin, and everything will work anyway. Kotlin is therefore a new feature that can be easily and successfully used in Java-based applications.

It is not unimportant for the Kotlin language that, in addition to JetBrains, a vibrant community is also watching over its development, which will probably grow even more after Google’s decision. Kotlin doesn’t have to be java’s killer at the same time. Just look at what happens in iOS. We have both Objective-C, which is still supported by Apple, and swift. Still many applications are created in Objective-C. in the case of Android can be similar. Let’s not forget that Java is still the most popular programming language in the world. So will Kotlin really become the future of Android, will it be a breakthrough for him? It is difficult to answer unequivocally at the moment. One thing is certain: recognition as the official language of Android has become a breakthrough for Kotlin.

Go to our cases Get a free quote