Tuesday , June 27 2017

Google welcomes Kotlin to Android


In the Google I/O 2017 keynote on the very first morning the biggest cheer of the session came when it was announced that Android is getting official support for Kotlin.

From now, Android Studio 3.0 ships with Kotlin out of the box. This makes it a lot easier and simpler for developers to use Kotlin for their projects. Previously plugins and extras were required to be installed to guarantee Kotlin compatibility with Android Studio.

Kotlin is a modern programming language that is designed to run on the Java Virtual Machine. Kotlin is designed with a large amount of interoperability with Java such that projects can contain both Kotlin and Java code and still be able to compile without any issues. The aim of Kotlin is to be an enhancement to Java and at the same time be intuitive and easy to read.

The official support for Kotlin does not mean that support for Java or C++ is ceased but it is an additional programming language. Google said that using Kotlin will make Android development faster than what it currently is. The big advantage of Kotlin is that it is designed by people in the industry and not academia. It thus solves issues faced by those programming at the coalface.

The learning curve for Kotlin is also apparently small and can be learned in only a few hours. For example many lines of Java code can be written with only a single line of code in Kotlin.

Kotlin code V Java code

So why is the addition of Kotlin a good thing?

Java, in the version that is usually used in Android, contains a lot of historical baggage and issues. Many of these issues have been fixed in newer versions of Java but these versions are not practical for Android in most cases as it required the minimum SDK to be set to Android 24 (thereby ruling out a lot of users from using the app).

Kotlin is able to fill the gaps left by Java, while at the same time supporting everything that Java does. At the same time the code is more compact, easier to write, and easier to understand. Don’t forget that using Kotlin also allows the user to use much of the same code for both iOS and Android apps!

What about us?

Simpler code means faster code. Simple as that. Faster code means faster apps. Add in the faster development due its ease of use and it is a win-win for developers and users alike.

For those who want to try out Kotlin head over to their website and have a go. It was very obvious to us at Google I/O that the Googlers were very enamoured and excited with the prospect of using Kotlin. For this reason we expect it’s support and use within Android to grow in the coming months and years.

 

Scott Plowman   Associate Editor

Scott is our modding guru - he has his finger on the pulse of all things ‘moddable’, pointing us towards all the cutting edge mods hacks that are available. When he’s not gymming it up, or scanning the heck out of Nexus devices, you'll find him on the Ausdroid Podcast.

Outside of Ausdroid, Scott's a health care professional and lecturer at a well known Victorian university.

Join the Ausdroid Conversation

Be the First to Comment!

avatar
wpDiscuz

Check Also

Linksys Velop receives a firmware update which enables browser-based configuration interface

When I reviewed the Linksys Velop just a week or two ago, one of the …