Slide 7
Slide 7 text
No primitive types, everything is an object
◦ Standard classes Int, Long, Char, Boolean, String, etc.
◦ Unit as the single-value type
fun main(args: Array): Unit { … }
◦ Nothing as the type that never exists
fun todo(): Nothing = throw AssertionError()
◦ null has the type of Nothing?
◦ Any as the very base type for everything (not-null)
fun equals(other: Any?): Boolean = …
Interfaces and classes
Nullable and not-null types
◦ E.g. String? and String, Any? and Any, etc.
Kotlin: from null dereference to
smart casts 7