Learning KotlinLearning Kotlin
  • English
  • FranΓ§ais
GitHub
  • English
  • FranΓ§ais
GitHub
  • πŸš€ Presentation of Kotlin
  • πŸ“š Kotlin language features
  • πŸ“š Backend development
  • πŸ“š Frontend development
  • πŸ›  Let's make a cross-plaform app !
  • πŸ“š Advanced and other Kotlin features
  • πŸ“… Workshops

πŸš€ 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 GraalVM.
    • 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 KEEP 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 Sheldon

  • 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?

Please find more statics here:

  • Kotlin Census 2020
  • JetBrains' Kotlin state in 2021

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:

  • Java Vs Kotlin: Which One Is Better To Learn In 2022?
  • 8 Reasons Why You Should Switch To Kotlin From Java

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

decision tree

Prerequisites

  • Recommended: IntelliJ IDEA (Both community or ultimate are OK),
  • or GitPod by opening https://gitpod.io/#https://github.com/worldline/learning-kotlin to create a workspace and then browser to the material folder,
  • or VSCode (with Kotlin and Java plugins) + JDK 17 (install via scoop.sh on windows or SDK man on Unix) + gradle

πŸ“– Further reading

  • Kotlin on Wikipedia
  • Introducing Kotlin support in Spring Framework 5.0
  • 8 stats and facts you should know about Kotlin in 2022
  • Why should you learn Kotlin in 2022?
  • Kotlin is awesome
  • Awesome Kotlin
Edit this page
Last Updated:
Contributors: yostane
Next
πŸ“š Kotlin language features