CS 346 (W23)
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Learning Kotlin

Why Kotlin?

Kotlin is a modern language designed by JetBrains in 2011. Originally designed as a drop-in replacement for Java, Kotlin has a number of language features that make it desireable for building applications. We’ll focus on Kotlin/JVM, which gives us the ability to build programs that will run anywhere where we have a JVM installed (including Windows, macOS, Linux).

  • It has a very clean syntax, and supports quality-of-life features like default arguments, variable argument lists and rich collection types. It’s syntax closely resembles modern languages like Swift or Scala.
  • It’s a hybrid language: it can be used for declarative programming or class-based object-oriented programming. It also supports a number of functional features, especially with the use of collection classes. This allows a programmer to use the best appropach for a particular task.
  • Kotlin is statically compiled, so it catches many potential errors during compilation (not just at runtime). It’s also strongly typed, with type inference.
  • Critically, it supports compilation to a number of targets: JVM for Windows/macOS/Linux Desktop, Android native1, or Web. It can also build to native macOS and Windows (with some restrictions).
  • It has outstanding tools support with IntelliJ IDEA.

Kotlin is an ecosystem


  1. Kotlin has been adopted as the “official” language for Android development! ↩︎