Spec proposal
Michael O'Brien
mob at mbedthis.com
Thu Dec 13 08:07:37 PST 2007
I understand that the cut off for proposals is long past. But I believe
this is an important issue that will force non-standard implementations
.... bad.
Proposal:
Running ECMAScript on embedded devices is more and more common. It is
being used in mobile phone widget engines, mobile browsers and it a wide
variety of embedded infrastructure hardware. However many such devices
do not have floating point and this has forced non-standard language
extensions to allow other default numeric types. For example: most
feature phones (> 500M devices) do not have floating point and have very
modest CPU resources. Furthermore, the proposed ES4 decimal standard is
currently implemented in software as there is no common hardware support
for it (yet). Consequently, it is fairly large and slow and will
certainly put a strain on feature phones!
We should allow the default number type to be an integer or 64 bit
integer. Many of embedded devices have very good 64bit integer support
that is quite fast. 64 bit integer support is important if floating
point or decimal is not available to provide a wider scale of numeric
values.
To do this, I'd like to propose that:
1. We change the "use decimal" pragma to "use number NUMBER_TYPE". This
would allow for other number types. E.g.
use number decimal
use number int
2. We add support for int as the default number
3. We add "long" and ulong types that are by definition 64 bit. Also
support "use number long"
Michael O'Brien
More information about the Es4-discuss
mailing list