Skip to content

Instantly share code, notes, and snippets.

@cbruegg
Last active February 26, 2021 23:12
Show Gist options
  • Save cbruegg/d982a4bdc47757633f5355d4f1252d0e to your computer and use it in GitHub Desktop.
Save cbruegg/d982a4bdc47757633f5355d4f1252d0e to your computer and use it in GitHub Desktop.

Using Kotlin in Android projects

What is Kotlin?

Kotlin is a programming language backed by JetBrains, the company that develops IntelliJ IDEA, which is the backend of Android Studio. After five years of development, version 1.0 was released in February, 2016. Kotlin compiles to JVM bytecode that is fully compatible with the Android platform. The developers even pay special attention to it by providing libraries (for example Anko), tooling and more.

It is a language designed for interoperability with Java code, which allows for a gradual migration from Java to Kotlin. The tooling is great and aids usability much. Additionally, picking up the language is very easy if you already know Java, since the syntax and concepts are similar, while still providing a lot of value for developers held back by the bad Java support on Android. Most developers are currently limited to Java 7 or even Java 6 and it will take a long time before we'll be able to properly use features like lambda expressions to make code more readable and concise.

Development lead Andrey Breslav has said that Kotlin is designed to be an industrial-strength object-oriented language, and to be a better language than Java but still be fully interoperable with Java code, allowing companies to make a gradual migration from Java to Kotlin.

Some more facts:

Who is using Kotlin?

Who thinks that Kotlin is a good choice in production?

JetBrains held back version 1.0 for a long time, since they really wanted to make sure the API and the compiler are stable. Additionally, they guarantee binary compatibility of old code with future releases.

@sivabudh
Copy link

Thanks for taking the time to write this up. 👍

@dcow
Copy link

dcow commented Feb 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment