Thoughts on IEEE P754

Maciej Stachowiak mjs at apple.com
Sat Aug 23 02:07:36 PDT 2008


On Aug 22, 2008, at 2:46 PM, Mark S. Miller 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.

I'm on the EcmaScript committee, but I'll answer anyway. My impression  
is that decimal support is wildly out of line with the stated goals of  
ES3.1 (cleanup and minimal critical enhancements), and was only  
brought under consideration because of IBM's naked threat to vote  
against any spec that did not include it. In the era of competing  
specs, buying IBM's vote was worth a rush job.

Furthermore, even though decimal doesn't seem like a completely  
useless feature, I believe it has been given far disproportionate  
weight relative to its actually value to the wide range of possible  
Web applications, perhaps because it is of particular interest to Web  
applications that directly handle money. However, that is either not  
present or only a minor part of many of today's popular Web  
applications on the public Web.

To my view, Decimal is much less important overall than, say,  
ByteArray or some other effective way to represent binary data, which  
is not in ES3.1 and was even rejected from ES4 (at least as then  
spec'd). There's a lot more popular Web applications that would be  
interested in manipulating binary data efficiently than care about  
calculating prices.

Finally, while Decimal seems like it will be useful to knowledgeable  
developers dealing with financial data, it seems likely to confuse the  
average developer more than it will help. At least, a fair amount of  
the discussion so far has made me feel confused, and I'd like to think  
I have more than the average understanding of machine arithmetic for a  
programmer.

Now that we are beyond the era of competing specs and in the era of  
Harmony, perhaps we could reconsider the value of buying IBM's vote,  
and incorporate enhancements to the ECMAScript number model in a  
thoughtful, unrushed way, after appropriate consideration of the  
merits and use cases.

Regards,
Maciej



More information about the Es-discuss mailing list