Kotlin Language

  • Kotlin is designed to interoperate fully with Java.
  • Kotlin mainly targets the JVM, but also compiles to JavaScript or native code (via LLVM); e.g., for native iOS apps sharing business logic with Android apps.
  • On 7 May 2019, Google announced that the Kotlin programming language is now its preferred language for Android app developers.
  • https://kotlinlang.org/
  • https://github.com/JetBrains/kotlin

History

版本 时间
v1.0 2016-02
v1.2 2017-11
v1.3 2018-10
v1.4 2020-08
v1.5 2021-05
v1.6 2021-11

Language features

  • Type inference
  • Null safety
  • Semicolons optional
  • String interpolation
  • for in
  • Unpack arguments with spread operator
  • Destructuring declarations
  • Nested functions

Null safety

?. Safe navigation operator
?: null coalescing operator