On Sat, Aug 23, 2008 at 1:49 AM, Mike Cowlishaw <[EMAIL PROTECTED]> wrote:
>> Finally, I'd like to take a poll: Other than people working on decimal
>> at IBM and people on the EcmaScript committee, is there anyone on this
>> list who thinks that decimal adds significant value to EcmaScript? If
>> so, please speak up. Thanks.
>
> Decimal arithmetic is sufficiently important that it is already
> available in all the 'Really Important' languages except ES
> (including C, Java, Python, C#, COBOL, and many more).  EcmaScript is
> the 'odd one out' here, and not having decimal support makes it
> terribly difficult to move commercial calculations to the browser for
> 'cloud computing' and the like.

Decimals in Java are implemented at the library level, as
java.math.BigDecimal. There is no expectation that intrinsic math
operators work on them. Is this approach valid for ES; if not, then
why not?

Implementing decimals at the library level has the advantage that they
can be deployed today, as functional (if slower) ES code, and
optimized later on by a native implementation with no loss of
compatibility. After all, it will be several years before the next ES
version becomes reliably available on consumers' browsers. Does this
manner of easing migration inform the approach being taken?

Conversely, if one is to add support for the intrinsic math operators
on decimals, does the required work generalize easily to arithmetic on
complex numbers and matrices? Will the addition of complex numbers and
matrices require more difficult work about how they interoperate with
existing number representations (including, at that point, decimal
numbers)? How, if at all, does this inform the present discussion?

Ihab

-- 
Ihab A.B. Awad, Palo Alto, CA
_______________________________________________
Es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to