Skip to content
Search

Kotlin

lastmod 2025-07-30created 2016-05-2416 edits

Kotlin is a statically-typed programming language that runs on the Java Virtual Machine and also can be compiled to JavaScript source code. Its primary development is from a team of JetBrains programmers based in Saint Petersburg, Russia (the name comes from the Kotlin Island, near St. Petersburg). Kotlin was named Language of the Month in the January 2012 issue of Dr. Dobb's Journal. While not syntax compatible with Java, Kotlin is designed to interoperate with Java code and is reliant on Java code from the existing Java Class Library, such as the collections framework.

Categories

  • Kotlin:Basic
  • Type bounds
    • Invariance (invariant)
    • Covariance (covariant)
    • Contravariance (contravariant)

Libraries

Does Android need a new language?

As the Java lawsuit between Google and Oracle dragged on, people began to think Android might abandon Java and became interested in what alternative languages there were. Some pointed to Go, a language made by Google, and there were some moves within Google to use Go for Android, but people say it is impossible because of compatibility with the enormous amount of API written in Java.

Kotlin is a development language made by Jetbrains that runs on the Java Virtual Machine (JVM), like Scala. In other words, compiling Kotlin produces bytecode that runs on the JVM. Jetbrain is a company famous for the IntelliJ series (which provides an optimal IDE for each language, such as Java, Python, Ruby, C, Javascript, etc.), which is hugely popular among developers these days, and it has become even better known recently since Android Studio was built on the Jebrains IDE platform. So the first advantage is that you don't have to worry about the IDE when using Kotlin.

Why Kotlin?

One of the reasons Kotlin is in the spotlight as an alternative language to Java on Android is that it is 100% compatible with Java. So you can use the current Android APIs as they are, and you can use all Java frameworks. You can also use build systems such as Ant, Maven, and Gradle. With this, the biggest barrier to moving from Java to Kotlin can be said to have been cleared. A tool for converting Java code to Kotlin code is also provided.

One of the advantages Kotlin promotes is freedom from the Null pointer exception. Kotlin's type system saves you from the Null exception, the most common error in Java. It also reduces Java's boilerplate code and provides a syntax for writing concise code. It reduces the hassle of getters/setters and lets you declare functions outside of a class, giving convenience and freedom. Functional programming is supported, of course, and as a newly made language, many of the inconveniences of Java have been improved. As development tools, besides the Commandline compiler, you can also install the Kotlin plugin in IntelliJ or Eclipse.

Kotlin/Native

Documentation

Identifying the core of Kotlin - Android Studio 3 & Programming: Learning Only the Essentials, supplementary booklet, for distribution.pdf
Identify_the_core_of_Kotlin.pdf

See also

Favorite site

Guide

Article

author Zer0 sitemap