This seems to be a question on whether clojure supports java auto-boxing. 

What java is doing here:
if (new Boolean(false)) {
  // true
}
is calling .booleanValue on the Boolean object (as mentioned above).

And here:
int x = new Integer(6) + 4;
intValue is being called on the Integer object.

Into the world of clojure, when I do:
user=> (+ (java.lang.Integer. 6) 4)
10
it looks like clojure is doing something similar to java auto-boxing.
but when I do:
(if (java.lang.Boolean. false) "t" "f")
"t"
It looks like clojure isn't doing anything like auto-boxing.

I can see how this would be a little confusing for people coming from the 
Java world.

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