3 ms·
False and nil being two distinct values isn't Clojure's fault though. Or not directly. There are a bunch of trade offs that Clojure makes to have very direct in
by dgb23 4y ago
False and nil being two distinct values isn't Clojure's fault though. Or not directly. There are a bunch of trade offs that Clojure makes to have very direct interop with its host languages.
- SeanLuke 4y agoClojure sits on the JVM. Why can't false be false and nil be NULL? I know of no other JVM-based lisp system which makes this "tradeoff". Indeed Kawa, which is rather faster than Clojure in my experience, does not.
- dgb23 4y agoClojure's nil on the JVM and Java's null are the same value. Are we misunderstanding each other, or am I missing something?
- deleted 4y ago[deleted]
- SeanLuke 4y agoI think we're talking past each other. Clearly in Clojure nil and false are different as NULL and false are different in Java. But in Clojure, they're both falsey, a really stupid design decision: but in Java they are NOT both falsey, only false is.
- peferron 4y agoNope, it's a great design decision.
- deleted 4y ago[deleted]