πŸš€ Presentation of Kotlin

Kotlin is a modern programming language developed by JetBrains.

Some features

  • Kotlin compiles to many targets: the JVM, JS, WASM, Android, iOS, Desktop, native code, etc.
    • Many server frameworks officially support Kotlin such as Spring and Quarkus.
    • It is the first-class language for writing Android.
    • Kotlin can compile to native with Kotlin native or with GraalVMopen in new window.
    • KMP allows to share code between different platforms.
  • Kotlin can be considered as both fullstack and corss-platform language.
  • Inter-operable with Java.
  • Provides modern features such as compile-time null safety and data classes.
  • Supports Object oriented programming and functional programming.
  • Kotlin KEEPopen in new window is its open source evolution process.

History

  • February 15, 2016: Kotlin 1.0 was released.
  • January 04, 2017: Spring introduced Kotlin support in Spring 5.
  • At Google I/O 2017, Google announced first-class support for Kotlin on Android.
  • On 7 May 2019, Google announced that Kotlin the preferred language for Android app developers.
  • June 2022: Kotlin 1.7 was released with the version of the new K2 compiler.

Some numbers and facts

Source: Amyra Sheldonopen in new window

  • As of 2022, Kotlin is used by 7.8% of the industry experts.
  • According to StackOverflow, Kotlin was the 4th most beloved language in 2020 with 62.9% votes.
  • Kotlin is now listed among the top 20 programming languages by Redmonk.
  • Kotlin is among the top 3 languages that most businesses are planning to migrate their apps to in 2022.
  • Kotlin is used by global companies like Google, NetFlix, Amazon, Trello, and more.
  • Pinterest and Uber are among the companies that migrated their apps to Kotlin from Java.
kotlin used for what?
kotlin used for what?

Please find more statics here:

Why switch from Java to Kotlin

Here are some arguments that motivate switching from Java (version 17 LTS at the time of writing) to Kotlin.

  • Kotlin supports more targets than Java.
  • Kotlin has compile time null-safety (Java Optionals are runtime wrappers for nullable values and null annotations have less features).
  • Kotlin strings support interpolation.
  • Casting in Kotlin is smart.
  • Kotlin functional programming features are better. It even allows to define Type-Safe builders and DSLs.
  • Kotlin can be mixed with Java code, thus helping the migration process.

You can read more arguments in these articles:

A decision tree to help you decide if you should use Kotlin

decision tree
decision tree

Prerequisites

πŸ“– Further reading