On Thu, Jul 28, 2011 at 3:05 AM, Sean Corfield <seancorfi...@gmail.com> wrote:
> On Wed, Jul 27, 2011 at 5:56 PM, Ken Wesson <kwess...@gmail.com> wrote:
>>> In Clojure 1.2:
>>>
>>> (type (bigint 2)) => java.math.BigInteger
>>>
>>> In Clojure 1.3:
>>>
>>> (type (bigint 2)) => clojure.lang.BigInt
>>> (type 2N) => clojure.lang.BigInt
>>
>> What the devil? Why was this done? Seems like wheel reinvention to me.
>
> Chas has already pointed you at the rationale / discussion but I'm a
> bit surprised you reacted as if this was news - the numeric changes in
> 1.3 have been discussed at great length in a number of threads here
> dating back over a year (and you, yourself, were active in at least
> one such discussion back in December 2010).

Discussions about primitive arithmetic, not BigInteger arithmetic.

>> And format should account for it.
>
> I can see arguments on both sides. format is clearly documented to be
> a thin wrapper around java.lang.String.format so by that measure we
> shouldn't expect it to handle Clojure's BigInt. OTOH, it's reasonable
> to expect BigInt to behave "just like" any other regular numeric type
> in Clojure and therefore Clojure's own format function should treat
> BigInt as valid for %d.

That'd be my position, yes. Also, backward compatibility: format works
in 1.2 with (* 400000000000 400000000000 400000000000) so it should
work in 1.3 with (* 400000000000 400000000000 400000000000).

> Might be worth opening a JIRA ticket for enhancing format, yes?

You go ahead. I don't have an account there.

-- 
Protege: What is this seething mass of parentheses?!
Master: Your father's Lisp REPL. This is the language of a true
hacker. Not as clumsy or random as C++; a language for a more
civilized age.

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