re: You Either Have It Or You Don't VIEW POST

re: 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 simplif...

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.

Yes, I understand the difference. The question is if there’s an inherent benefit to nulls or if there’s value to potentially modeling them as “not having something.” The answer is not super straightforward and I believe changes a lot with the domain, something that has been explored in a different comment (scripting vs core business logic for example).

code of conduct - report abuse