On Mon, May 16, 2011 at 2:15 AM, Meikel Brandmeyer wrote:
> From the Java documentation:
>
> "Note: It is rarely appropriate to use this constructor. Unless a new
> instance is required, the static factory valueOf(boolean) is generally a
> better choice. It is likely to yield significantly better
>From the Java documentation:
"*Note: It is rarely appropriate to use this constructor. Unless a newinstance
is required, the static factory
valueOf(boolean) is generally a better choice. It is likely to yield
significantly better space and time performance.*"
Emphasis not mine.
IIRC, it was
user=> (defn truthy? [x] (if x true false))
#'user/foo
user=> (truthy? nil)
false
user=> (truthy? Boolean/FALSE)
false
user=> (Boolean. false)
false
user=> (truthy? (Boolean. false))
true
Wait, what?
Looks like Clojure's truthy check is looking for something to be
either nil (= Java null) or the