3 ms·
I particularly like their much simpler approach to null-safety. Null is a ghost that haunts every imperative language, and it's great to see a good solution. Sc
by aneth 15y ago
I particularly like their much simpler approach to null-safety. Null is a ghost that haunts every imperative language, and it's great to see a good solution. Scala's is also nice, but wordy and difficult for newbies.
Simply being able to call a method chain without null checks or pattern matching is really nice. In Kotlin, you can either declare the variables non-nullable or use a safe call chain, e.g.
kennel?.mommies?.puppies()
http://confluence.jetbrains.net/display/Kotlin/Null-safety http://confluence.jetbrains.net/display/Kotlin/Null-safety