Hi,

On Aug 12, 11:54 am, Tayssir John Gabbour
<[email protected]> wrote:

> On this topic, how do primitives work? I heard something about
> "function boundaries." Which I interpret to mean that when a function
> returns a primitive, Clojure boxes it in some Java object. And type
> declarations can't stop this boxing from happening.
>
> Is this a correct understanding?

This is correct, because the invoke methods of the IFn interface
are based on Object, thus cannot return (or take) primitives.

> And what is the performance penalty here?

Not sure, but putting performance critical code into
a let with unboxing the primitives proofed to be a
good idea in the past.

Sincerely
Meikel

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