Decimal as quasi-parser (Was: [Caja] Fwd: ES3.1 Draft: 07 Nov 2008 "Kona" version available)

Tyler Close tyler.close at
Tue Nov 18 11:22:45 PST 2008

On Thu, Nov 6, 2008 at 2:33 PM, Mark S. Miller <erights at> wrote:
> The EcmaScript 3.1 draft standard is rapidly congealing towards an official
> standard. The Kona version at
> <>
> is the important one -- details aside, the only remaining significant
> unsettled controversy is whether Decimal remains or is pulled from ES3.1.

It seems the desire to add Decimal to Javascript is a special case of
the generic desire to have custom syntax inline in a Javascript
program. In this case, the desire is to manipulate Decimal objects
using math operators. Is there any chance this issue could be
side-stepped by adding support for quasi-parsers, like in the E
language? So instead of:

0.1m + 0.1m

you'd have:

m`0.1 + 0.1`

The variable m would be initialized to some implementation in
Javascript. VMs that recognize this implementation code could then
substitute their own more efficient native implementation. Other VMs
just execute the provided implementation as normal Javascript code.


More information about the Es-discuss mailing list