Quick facts about Kotlin
- In Kotlin
;
is not mandatory. - Kotlin is null-safe.
- Kotlin offers 100% Java interoperability.
- Kotlin is strongly typed.
- Kotlin knows/needs no primitives.
- Kotlin classes have properties, not just simple fields.
- Kotlin offers data classes, with automatically generated
equals
/hashCode
methods and more - Kotlin knows only runtime exceptions, no checked exceptions.
- Kotlin has no
new
. - Kotlin supports operator overloading.
- Kotlin functions support default values for parameters.
- In Kotlin, function arguments can alternatively be referenced by name.
- Kotlin offers string interpolation:
println("Hello, $userName! You have ${inbox.size} new messages.")
. - Kotlin distinguishes between mutable and immutable collections.
- Kotlin can be compiled not only to JVM bytecode, but also to JavaScript.
- Kotlin is fully compatible with Java 6, which is particularly interesting for Android developers, who also want to reach users who do not use the latest mobile devices.
- Kotlin is an officially supported language for Android development.
- Kotlin offers coroutines as an alternative to “blocking multithreading”.
- Kotlin is open source and released under the Apache License 2.0.
- Kotlin is lead by JetBrains, the company behind “IntelliJ IDEA”.