
Kotlin expressiveness
One of the things that feels much different in Kotlin compared to Java is the type system. The void
keyword for example is not present in Kotlin, so Unit type is used instead:
fun functionReturningNoValue(): Unit {
println(“Hello”)
}
I would say that this approach is more consistent than using a special keyword to denote functions that don’t return any value.