ES3.1 Proposal Working Draft

Maciej Stachowiak mjs at apple.com
Wed Feb 20 14:28:33 PST 2008


On Feb 20, 2008, at 1:00 PM, Adam Peller wrote:

> >Each of us has some pet addition we think would be a great addition  
> to
> >the language. "const", "decimal", getters and setters, destructing
> >assignment -- all these have come up just this morning!. Each of  
> these
> >makes the language larger and more complex, imposing a general  
> diffuse
> >cost on everyone.
>
> 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
>

Besides compatibility issues, this would be a significant performance  
regression for math-heavy code. I would consider this a showstopper to  
implementing such a change.

I also agree with Mark's comment that arbitrary-precision integers and  
arbitrary-precision rationals seem like more generally useful types  
than decimal floating point, if any numeric types are to be added, but  
that seems like an issue more for ES4 than 3.1.

  - Maciej




More information about the Es4-discuss mailing list