On Wed, Aug 18, 2010 at 11:34 AM, David Nolen <dnolen.li...@gmail.com>wrote:
> On Wed, Aug 18, 2010 at 11:09 AM, Brian Hurt <bhur...@gmail.com> wrote: > >> This is, however, more than a little bit surprising and depressing. >> Somewhere, in my 10K lines of clojure code, boolean values are getting boxed >> in exactly that way. I've fixed the current problem (dropping in a call to >> .booleanValue in the test), but having if statements that can fail makes me >> paranoid. >> >> Brian >> >> Somewhere in your code you are creating boolean values instead of just > using Clojure's true and false. Get rid of this code. > > > For the record, no where in my code am I deliberately creating Boolean objects. Why the hell would I write (new java.lang.Boolean false) when I can just as easily write false? And I have looked through the code to see if something stupid like that did sneak in, and didn't find anything. So this means what is happening is the values are being boxed because of some subtle interaction I haven't tracked down yet. Could it be something to do with Java's serialization? Or maybe the way Clojure boxes boolean values? I don't know. So unless you have some information on what I could be doing wrong, simply going "don't do that" does not help. Brian -- 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