BT

Your opinion matters! Please fill in the InfoQ Survey!

Kotlin Is Now a Supported Android Language

| by Abel Avram Follow 4 Followers on May 18, 2017. Estimated reading time: 2 minutes |

Announced during Google I/O 2017, Android Studio 3.0 adds full support for Kotlin which is to be moved from JetBrains to an independent non-profit organization for future development.

Google has added Kotlin to the short list of programming languages supported for Android development, which are Java and C++. Among reasons for choosing Kotlin, Google mentioned it being "concise, expressive, and designed to be type- and null-safe" and also "many Android developers have already found that Kotlin makes development faster and more fun." Another important reason was that Kotlin is a language fully interoperable with Java and running on the JVM. Kotlin can also call C++/Android code because it supports JNI through the external modifier. From Kotlin source code, one can generate Java bytecode for the JVM or JavaScript source code.

In the past, developers had to use a plug-in for Android Studio to program in Kotlin but now they get full support starting with Android Studio 3.0, including refactoring, auto-complete, lint, debugging and everything else. Android Studio 3.0 was just announced at Google I/O 2017 but it is only a canary preview release yet. A few more months will be needed until it is ready for prime time.

One of the language features that make it easy for adoption is Kotlin's interoperability with Java. Android Java code can be invoked from Kotlin or Kotlin code can be called from Java, and an Android project can include both Java and Kotlin files. One can even convert existing Java files to Kotlin. Developers are not forced to go Kotlin all in, but they can continue developing in Java and test the waters to see if they like Kotlin. Those who enjoy the conciseness of the new language may want to do more work in it.

Being compatible with JDK 6, Kotlin code runs on every Android version, including the older ones. Regarding Kotlin co-routines, they are supported by Android but since they are an experimental feature Google does not guarantee anything regarding their future. They depend on how the language evolves.

Google mentioned they are working with JetBrains to move the language to a non-profit organization. Although the language is open source, such an organization would provide some assurance that the future of the language is not in one company's hands. This move is also an indication that Google might get involved in pushing Kotlin forward, which is good news for the language.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

kotlin by Tracy West

While Java evolved to incorporate several functional programming concepts since Java 8, Kotlin has functional programming baked right in. This includes higher-order functions, lambda expressions, operator overloading, lazy evaluation and lots of useful methods to work with collections.
The combination of lambda expressions and the Kotlin library really makes your coding easier. Another new research about Kotlin I liked her yalantis.com/blog/how-to-work-with-delegation-i...

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT