2008/2/20 Adam Peller <[EMAIL PROTECTED]>:
>  Mark, as I recall, the discussion at the March meeting in Newton involved
> implementing decimal arithmetic in ES3.1 to *replace* the floating point
> implementation in ES3, thus "no new syntax". Yes, this would have unexpected
> results for those who actually have code logic which expects a value of
> "46.19" pounds, in Mike's example (see Numbers thread) but the benefits here
> seemed to far outweigh this discrepancy. I can't speak to the technical
> level of detail that Mike can, but at a high level it's seen as a bug by the
> vast majority of users, and for all practical purposes, that's what it is.


I was not at the March meeting. If decimal is sufficiently compatible
with binary double precision floating point to keep old programs
working, I might be willing to consider *replacing* double with
decimal. How compatible are they? What numbers are representable as
double but not decimal? Does decimal have NaN, Infinity, -Infinity,
and -0.0? (Btw, I never liked -0.0. And I especially dislike ES3's
behavior that 0.0 === -0.0. However, I would argue against making
incompatible changes to this.)

The other design constraint is that ES4 be a compatible superset of
ES3.1. In light of your message, I checked the ES4 wiki pages.
<http://wiki.ecmascript.org/doku.php?id=proposals:numbers&s=decimal>
seems to imply that use of ES3 syntax for numbers is to be interpreted
(approximately) according to ES3 rules. Are the ES4 folks willing to
*replace* binary floating point with decimal and drop the decimal
literal syntax?

If not, then I don't see how we could allow decimal into ES3.1.

-- 
    Cheers,
    --MarkM
_______________________________________________
Es4-discuss mailing list
Es4-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to