Adobe position paper on the ECMAScript 4 proposal space -- decimal

Brendan Eich brendan at mozilla.org
Wed Feb 27 10:40:26 PST 2008


On Feb 27, 2008, at 10:25 AM, Peter Hall wrote:

> Was decimal ruled out as its own type?

First, nothing's "ruled out" -- you're asking the wrong guy if you  
want Adobe's position, but see Lars's reply to Mike Cowlishaw:  
decimal as a type without any implicit literal/operators mode is  
still possible, although the Adobe position paper defers it. As Lars  
noted, it even has a trial implementation in Tamarin.

Second, decimal is in the RI as proposed, more or less.

Finally, whatever we do, we won't make certain BigMistakes. I wrote a  
long time ago in

http://wiki.ecmascript.org/doku.php?id=discussion:decimal

citing the amusing Cameron Purdy blog post at

http://jroller.com/cpurdy/entry/the_seven_habits_of_highly1

The first comment:

> At a client gig, they were doing business/financial coding, so were  
> using BigDecimal.
>
> Of course, .add() and friends is too difficult, so they ended up  
> with roughly:
>
> BigDecimal subA = ...
> BigDecimal subB = ...
>
> BigDecimal total = new BigDecimal( subA.doubleValue() +  
> subB.doubleValue() );
>
> It was beautiful.
>
> Posted by Bob McWhirter on October 31, 2005 at 08:17 AM EST #


is horrifying testimony to the need for operator and literal syntax,  
if not implicit modal defaulting. If we keep decimal in ES4, it will  
have operators and literal support.

/be




More information about the Es4-discuss mailing list