Adobe position paper on the ECMAScript 4 proposal space -- decimal
MFC at uk.ibm.com
Thu Feb 28 00:49:13 PST 2008
Lars, thanks ...
> Regarding "Premature" / "Knowledgable users"
> When we say decimal is "premature" we mean it in the sense outlined
> in the paper only: The TG had an intuition about what we wanted for
> the language (The Right Thing - essentially a type of big red
> switch) but then we came to the conclusion that what we wanted is
> simply not workable on the web (see below), and therefore we now no
> longer know exactly what it is that we want. Therefore decimal is
> premature in the sense we use here: more experience may be necessary
> before the TG members know what we want. As authors of the position
> paper, Jeff and I did not and do not mean to imply that decimal
> arithmetic, considered in isolation, is immature, far from it.
OK, thanks for the explanation.
> About the big red switch. There are two variants: One is global to
> an execution context, were a program sets the global floating point
> mode to be decimal and all arithmetic is carried out in decimal (and
> all literals are decimal); the other is lexically scoped, where a
> "use decimal" pragma affects operators and literal interpretation in
> its lexical scope.
[snip detailed walkthrough of the issues]
Many thanks for the excellent summing up of the complexity of the problem,
and indeed I sense there is not yet a consensus on the 'best' solution for
ECMAScript. Much of your analysis applies to ES4 as a whole of course --
the general issue of whether a given segment of code is treated as ES3 or
ES4. A clean solution that works for decimal will also work for many
other aspects and simplify (and accelerate) the adoption of ES4.
Deferring the issue, however, cannot be the right thing to do. In the
future, the environment that ECMAScript runs in will certainly be even
more complex than today, and the language will be more complex, too; it
will be harder to integrate decimal support as time goes on, not easier.
Something as fundamental as arithmetic needs to be smoothly integrated as
early as possible, not left until it becomes almost impossible -- and the
time spent working out how to do that will surely pay off in cleanliness
of design and future extendability, because the general principles will
apply to other requirements.
In short: TC39 has gathered a remarkably talented group of people with a
depth of experience that goes right back to the origins of ECMAScript and
the Web. If this group cannot work out how to integrate decimal
arithmetic elegantly, who can?
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
More information about the Es4-discuss