typestar

Languages

Kotlin

A statically typed JVM language from JetBrains; Google's preferred language for Android development.

Practice Kotlin

27 steps across 1 tours, from the basics to complete programs.

The tours

First released
2011
Created by
JetBrains (led by Andrey Breslav)
Typing
Static with pervasive inference; null lives in the type system
Snippets target
2.3
File extensions
.kt, .kts

What it is for

Kotlin is the language of Android: Google made it the platform's preferred language in 2019, and today the large majority of the top Android apps ship Kotlin code. The pitch that won was interop — a Kotlin file calls any Java library and vice versa, so teams migrated one class at a time rather than rewriting — plus null safety enforced by the compiler on a platform whose most famous crash is the NullPointerException.

Off the phone it is a serious server language: Spring supports it as a first-class citizen, JetBrains' own Ktor framework is Kotlin end to end, and coroutines give it structured, lightweight concurrency that predates Java's virtual threads. Gradle build scripts, data pipelines, and multiplatform targets (JVM, JavaScript, native, WebAssembly) round out a language that goes wherever the JVM's ecosystem already is.

The design temperament is pragmatism over purity: data classes erase the getter boilerplate Java is famous for, extension functions let libraries read like language features, and scope functions, sealed hierarchies, and when expressions make everyday code shorter without becoming cryptic. It is a language built by an IDE company, and it shows — the tooling always came first.

Where it came from

JetBrains announced Kotlin in July 2011, naming it after Kotlin Island near St. Petersburg, where much of the original team worked. The company wrote the world's most-used Java IDE and wanted a better language for its own codebase: fully interoperable with Java, faster to write, and safe by default — and pointedly more practical than Scala, the era's other better-Java, which the team admired but found too slow to compile.

Kotlin 1.0 shipped in February 2016 with a compatibility promise, and adoption grew through word of mouth on Android, where developers stuck on Java 6-era APIs were hungry for modern language features. Google announced first-class Android support at I/O 2017 to a standing ovation, then named Kotlin the preferred language for Android development in 2019.

Since then the language has grown deliberately: coroutines stabilized in 2018, multiplatform matured from experiment to production, and the K2 compiler rewrite landed in Kotlin 2.0 in 2024, roughly doubling compilation speed. The Kotlin Foundation, created by JetBrains and Google, stewards the language's evolution through an open KEEP proposal process.

What it is like to type

Kotlin types like a tidied Java: the same braces and dots, far fewer of them. Declarations lead with val and var instead of types, string templates keep $ under your fingers, and lambdas put braces where parentheses would go — filter { it > 9 } is the signature cluster. The question mark works hard: ?. to chain past null, ?: to supply a fallback, as? to cast softly. Arrows land in every when branch and lambda, and the standard-library verbs — let, apply, map, joinToString — are short camelCase words that flow quickly once learned.

Practice Kotlin

27 steps across 1 tours, from the basics to complete programs.

Official documentation

Other languages