Re: When false is truthy

2011-05-15 Thread Ken Wesson
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

Aw: When false is truthy

2011-05-15 Thread Meikel Brandmeyer
>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

When false is truthy

2011-05-15 Thread Ken Wesson
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