Re: Operator overloading revisited

2009-07-05 Thread Brendan Eich
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

Re: Operator overloading revisited

2009-07-05 Thread Christian Plesner Hansen
> Operators are currently hardcoded in the language, but the specification > could be recast using multimethods or double dispach and then extended to > allow users to define operators on new "types" -- but what would be the > nature of those types? > > Anything like a number (primitive, as you not