Will uniform function call syntax apply to operator overloads?
Simen kjaeraas
simen.kjaras at gmail.com
Tue Oct 12 15:53:38 PDT 2010
Tomek Sowiński <just at ask.me> wrote:
>> As long as operator overloading is defined the way it is, it should work
>> like that, yes.
>
> Funny. I remember asking this not too long ago and got no as an answer.
> :)
I'm not saying it will. But as long as operator overloading is defined as
a rewrite of e.g. a + b => a.opBinary!"+"( b ), and uniform function call
syntax is defined as a rewrite of a.opBinary!"+"( b ) =>
opBinary!"+"( a, b ), and there are no extra, special rules in play, I
would be surprised if it does not work.
By this I mean, it would be anti-feature if it did not work, as the
compiler would have to be more complex to not support it than to support
it.
--
Simen
More information about the Digitalmars-d
mailing list