> Clojure could of course auto-unbox on recur to primitive local, but it  
> doesn't, for a reason. If you are using primitive locals it is because  
> you are looking for the speed of primitive operations....

That's the answer I was looking for. It is just confusing because it
is mentioned everywhere that Clojure uses boxed version of primitives.
The reason I got into this was converting a rational (or ratio) to
long in order to mimic Java's division operator. It is just a tough
experience on my first encounter to Clojure, I just couldn't figure
out what's wrong in my code. My suggestion would be to print a
detailed solution to the problem along with the exception message, or
may be document it somewhere. The mere existence of unboxed primitives
was a surprise to me. I believe a lot of newbies will try to do
something similar to what I was doing and will fail.

Thanks for everyone's effort and patience.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to