Fork me on GitHub
#clojure-dev
<
2019-12-26
>
Vincent Cantin13:12:20

[stupid question] why was if-not not implemented by exchanging then and else ? https://github.com/clojure/clojure/blob/clojure-1.9.0/src/clj/clojure/core.clj#L765

4
jeroenvandijk15:12:06

I don't think it's a stupid question. I've asked this before (I tried to find this conversation, but couldn't find it). I think it's for readability reasons. The overhead is considered to be negligible (mostly macrotime)

👍 4
andy.fingerhut17:12:39

Avoids the need and slight extra time to do a bit in the expression, likely

andy.fingerhut17:12:07

Sorry missed one not in your question :)