Re: Implementation of the special form if

2013-07-18 Thread Burt
Hi Ambrose, yes. Thanks. Burt Am Donnerstag, 18. Juli 2013 10:55:38 UTC+2 schrieb Ambrose Bonnaire-Sergeant: > > Clojure uses Boolean.FALSE and null are the only two false values by > design. c.c/boolean can be useful for > converting Boolean instances that are false in Java into those tha

Re: Implementation of the special form if

2013-07-18 Thread Ambrose Bonnaire-Sergeant
Clojure uses Boolean.FALSE and null are the only two false values by design. c.c/boolean can be useful for converting Boolean instances that are false in Java into those that are false in Clojure. Does that answer your question? Ambrose On Thu, Jul 18, 2013 at 4:50 PM, Burt wrote: > Hi Ambrose

Re: Implementation of the special form if

2013-07-18 Thread Burt
Hi Ambrose, thanks for the hint. The background of my question: Let's do something silly, namely: (def falsefalse (Boolean. false)) Then (we have been warned) we get (if falsefalse :t :f) ==> :t Reason: Compiler.java#L2569 checks on Boolean.FALSE But if we use the function boolean, we get (b

Re: Implementation of the special form if

2013-07-18 Thread Ambrose Bonnaire-Sergeant
Hi Burt, See the "eval" and "emit" methods of IfExpr in Compiler.java for evaluation and bytecode output respectively (IIUC) for "if". https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L2551 Thanks, Ambrose On Thu, Jul 18, 2013 at 4:30 PM, Burt wrote: > In whi

Implementation of the special form if

2013-07-18 Thread Burt
In which source file is the special form if implemented? -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your fi