BT

InfoQ Homepage News Kotlin Is Now a Supported Android Language

Kotlin Is Now a Supported Android Language

Bookmarks

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
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.

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

Community comments

  • kotlin

    by Tracy West /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.