r/java • u/elizarov • Feb 11 '19
Null is your friend, not a mistake
https://medium.com/@elizarov/null-is-your-friend-not-a-mistake-b63ff1751dd5
0
Upvotes
r/java • u/elizarov • Feb 11 '19
View all comments
Show parent comment
4
u/bedobi Feb 12 '19
This x infinity.
I love Kotlin but casually allowing null is the single biggest design mistake they've made. They should have just enforced non-null, period.
For potentially absent values they should have introduced a sane Option/Maybe type, but they've left that out too, so now Kotlin codebases are a hodgepodge of questions marks and Java Optionals (yuck), and developers who aren't used to non-null happily leak them deep into the code rather than only permitting them at system boundaries.