by danbruc · 10y ago · 0 comments
If you forbid casts or reflection, then you're throwing away much of the Java ecosystem.
That's not true. There are two fundamental differences:
(0) Options can nest. Nullability doesn't nest.
(1) Options are manipulated by pattern matching (or direct application of their induction principle, that is, Haskell's `maybe` function). In Java, you just assume a nullable variable isn't null, and if it is, well, you get an exception.