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
On Mon, May 16, 2011 at 2:15 AM, Meikel Brandmeyer m...@kotka.de 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
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