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 <burkhardt.r...@googlemail.com> wrote: > 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 > (boolean falsefalse) ==> false > > Reason: RT.java#L981 checks on the objects booleanValue > > Is this consistent? > > Greetings, > Burt > > > > > Am Donnerstag, 18. Juli 2013 10:36:40 UTC+2 schrieb 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<https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L2551> >> >> Thanks, >> Ambrose >> >> >> >> -- > -- > 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 first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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 first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.