Operator overloading revisited
Brendan Eich
brendan at mozilla.com
Sun Jul 5 22:38:53 PDT 2009
On Jul 5, 2009, at 7:52 AM, Christian Plesner Hansen wrote:
> Custom literals is a nasty problem. To work with decimal literals,
> for instance, the compiler can't be allowed to interpret numeric
> constants; that has to be delegated to the decimal library.
To clarify, we wouldn't make 123 or 3.14 be extensible (at least not
without some "use decimal" pragma, which seems very difficult to
implement, since it would not affect lexical scope or other compile-
time constructs, but rather have runtime effects). You'd have to write
1.1m or similar.
/be
More information about the es-discuss
mailing list