Es-discuss - several decimal discussions

Sam Ruby rubys at intertwingly.net
Sat Aug 23 10:47:27 PDT 2008


On Sat, Aug 23, 2008 at 1:12 PM, Mike Shaver <mike.shaver at gmail.com> wrote:
> On Sat, Aug 23, 2008 at 10:04 AM, Sam Ruby <rubys at intertwingly.net> wrote:
>> Decimal implemented as a library would be sufficient for a 3.1
>> release.
>
> Would it not be sufficient forever?  It seems like that's the strategy
> that Java, Python and C are taking, as far as the Really Important
> Languages go.  I'd be more comfortable getting experience based on an
> available library implementation before standardizing it, let alone
> standardizing a new native numeric type, but I'm not likely to move
> the committee needle.

I don't believe we know the answer to that question.  In any case, we
need to decide what the following will produce:

  Decimal.parse('2') + 3

Furthermore, it seems inevitable to me that this topic will come up at
the next TC 39 meeting in Redmond.  A minimal proposal, much along the
lines as the one you described above, was available for review in time
for the Oslo meeting, and resulted in a number of usability concerns
being expressed such as the one I described above.

Given this, the way I would like to proceed is towards a full and
complete proposal to be ready in time for people to review for the
Redmond meeting.  It may very well need to be scaled back, but I would
much rather be in a position where the edit requests that came out of
that meeting were in the form of "prune this" rather than once again
be presented with "investigate that and report back".

> Are people with critical decimal correctness needs using things like
> http://code.google.com/p/gwt-math/ today?  Other ports of BigDecimal?
> Other libraries that may be more "JS-like" than a straight port of
> Java?
>
>> To be sure, I then proceeded to implement such functionality using the
>> then current SpiderMonkey (i.e. pre TraceMonkey, meaning I'm facing a
>> significant merge -- the joys of DVCS),
>
> I don't think you'll find it a hard merge; the tracer is (by design)
> pretty well isolated from the rest of the engine.

Cool.  I'm mostly concerned with one source file (jsinterp.cpp), but
I'm confident that I will be able to manage.

> Mike

- Sam Ruby


More information about the Es-discuss mailing list