2014-08-06 1:59 GMT+02:00 Alex Miller <[email protected]>:
> And in general it really is Long (not long) - by default all Clojure
> values are objects, unless you have taken steps to use primitives.
>
You are right:
(class 0)
gives:
java.lang.Long
>
>
> On Tuesday, August 5, 2014 10:47:57 AM UTC-5, Michael Klishin wrote:
>
>> On 5 August 2014 at 19:43:21, Cecil Westerhof ([email protected])
>> wrote:
>> > > Because of the class of those values is Long. Why are those not
>> > Integer?
>>
>> To avoid the performance penalty of automatic promotion. In dynamically
>> typed languages
>> with auto-promotion of integers you have to perform a promotion check for
>> every
>> operation.
>>
>> It's not Long, by the way, it is long (the primitive).
>> --
>> @michaelklishin, github.com/michaelklishin
>>
>
--
Cecil Westerhof
--
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
---
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 [email protected].
For more options, visit https://groups.google.com/d/optout.