There is also this page on ClojureDocs that might shed some light on this
quirk:
http://clojuredocs.org/clojure_core/clojure.core/if
On Sun, Oct 6, 2013 at 6:14 PM, Rob Browning <[email protected]> wrote:
> Gary Trakhman <[email protected]> writes:
>
> > Clojure's false and true are Boolean/FALSE and Boolean/TRUE, and for
> speed
> > reasons (I think) anything that checks for truthiness uses java's ==,
> which
> > will fail on any new Boolean object. Usually, this isn't a problem, but
> > sometimes it is. You can see that this assumption is pervasive by
> looking
> > at the implementations of 'true?' and 'false?', which use identical? and
> > the check for != Boolean.FALSE in
> >
> https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L2569
>
> ...and further, my understanding is that the Boolean constructors are
> more or less considered a mistake, and you should effectively never
> use them. For example:
>
> http://rayfd.me/2007/01/17/the-evil-boolean-constructors/
>
> Hope this helps
> --
> Rob Browning
> rlb @defaultvalue.org and @debian.org
> GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
> GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to [email protected]
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> [email protected]
> 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 [email protected].
> 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 [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.