On Thu, Oct 20, 2011 at 22:50, Stuart Halloway
<stuart.hallo...@gmail.com> wrote:
>> It appears that the answer to the original question is "no, there is no way 
>> to configure the reader to default numbers with a decimal point to be 
>> BigDecimal instead of Double".
>>
>> Scott Hickey
>
> Reading a double implies that somebody upstream of you was using doubles, 
> which violates the guarantees you want from BigDecimals.
>
> Why is the upstream provider using doubles?

I don't follow. The OP has text, which Clojure is reading as doubles.
This only implies that upstream (which need not have been written in
Clojure) is producing numbers matching #"[-]?[1-9][0-9]*[.][0-9]*|0",
because LispReader interprets that as Double. Whatever internal
representation this text was produced form may or may not have been
(binary) floating point initially.

It doesn't seem reasonable to assume that the OP's "'business'
applications I've built over the last 25 years" could have known that
Clojure would come along later and expect to find "M" on the end of
every decimal number.

// Ben

// Ben

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