> However, if you do (let [x (java.lang.Boolean/getBoolean "false")] (if
> x :trouble :ok)) you're fine, which obviously isn't helpful in your
> situation.

Boolean.getBoolean() is pretty evil, too.  It was featured in one of
Joshua Bloch's java puzzlers (which might have been borrowed from
somewhere else, I don't know if it was originally his).  Watch out, it
might not do what you think it does. :)

For instance:
System.out.println(Boolean.getBoolean("false"));
System.out.println(Boolean.getBoolean("true"));
System.out.println(Boolean.getBoolean("fred"));

will print false three times.

Joe

-- 
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

Reply via email to