Argumnentation against external function operator overloading is unconvincing
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Fri Sep 23 03:44:25 PDT 2016
On Friday, 23 September 2016 at 08:50:56 UTC, Timon Gehr wrote:
>
> FQN disables UFCS. Nothing specific to operators here.
>
> There is no reason why there should be any difference between a
> + b and a.opBinary!"+"(b). In fact, 2.opBinary!"+"(3) should
> work too.
Currently this is tricky to implement in the compiler.
And it widens the scope for name-conflicts immensely!
I do not see a case where UFCS overloaded operators are worth the
trouble they introduce.
More information about the Digitalmars-d
mailing list