There is no evaluator in clojure (other than the one in the JVM) and
certainly no retries.
Clojure is a compiled language. All regular function are called via the IFn
interface, which takes objects. Function arguments and return values can be
type hinted to be primitive.
Normally such primitives are auto (un)boxed. If the type inferencer sees
you passing a primitive value into a primitive argument, the
boxing/unboxing is omitted.
type is not hinted at all, so its arguments must always be Objects.

In general, you can think of primitive values in clojure as an ephemeral
construct, that only lasts as long as there is a binding that can take it.


2013/2/22 John Lawrence Aspden <aspd...@googlemail.com>

> So, something like: (type 23) the reader makes a list of a symbol and a
> primitive, the evaluator evals to get a generic function and a primitive,
> then tries to apply the generic function to the primitive, can't find a
> primitive version, so boxes the primitive to an object and tries again, and
> then finds that there is a specific type function that takes long objects
> and applies that? (i.e. type isn't lying, but the evaluator is deceiving it)
>
> Are there any docs for this or any way to trace the process? How would I
> work out what's going on in a given case?
>
> On Thursday, February 21, 2013 6:59:33 PM UTC, Herwig Hochleitner wrote:
>>
>> Both are true.
>>
>> The type function doesn't have a primitive version, so its argument gets
>> auto-boxed.
>>
>>  --
> --
> 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
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to