Comparison to Java Programming Language
- Null references are controlled by the type system.
- Arrays in Kotlin are invariant
- Kotlin has proper , as opposed to Java’s SAM-conversions
- Use-site variance without wildcards
- Kotlin does not have checked
- Primitive types that are not classes - The byte-code uses primitives where possible, but they are not explicitly available.
- - replaced with companion objects, , extension functions, or .
- Wildcard-types - replaced with and type projections.
- - replaced with if expression.
- + Inline functions = performant custom control structures
- Null-safety
- String templates
- First-class delegation
- Singletons
- Range expressions
- Companion objects
- Coroutines