ah cool - thanks for clarifying. Then I guess I didn't really get his point!
about Either - yes, exactly - I was kind of deliberately over simplifying to make the point that there's other, sometimes nicer ways to think about Maybe
Passionate developer in Java and Scala. And sometimes, something else. A few months per year, someone calls me "professor". CoFounder of Scala By The Lagoon @scalagoon
Maybe, IIRC, comes from Haskell, which doesn't have nullability so it has nothing to do with nullability checking.
It has everything to do with encoding the fact that having a value or not having one are two different, equally informative, and perfecly legal values. And your code must be able to distinguish those and act accordingly.
Lisp, and then Clojure probably have different idioms (i.e. the empty list) that do not require a union type, and can be treated as equally informative. That's probably what Hickey has in mind.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
ah cool - thanks for clarifying. Then I guess I didn't really get his point!
about
Either
- yes, exactly - I was kind of deliberately over simplifying to make the point that there's other, sometimes nicer ways to think aboutMaybe
Maybe
, IIRC, comes from Haskell, which doesn't have nullability so it has nothing to do with nullability checking.It has everything to do with encoding the fact that having a value or not having one are two different, equally informative, and perfecly legal values. And your code must be able to distinguish those and act accordingly.
Lisp, and then Clojure probably have different idioms (i.e. the empty list) that do not require a union type, and can be treated as equally informative. That's probably what Hickey has in mind.