Operator overloading through UFCS doesn't work
Elie Morisse via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue May 24 16:19:32 PDT 2016
On Saturday, 13 October 2012 at 22:58:56 UTC, Timon Gehr wrote:
> Afaik free-function operator overloads (but not in the context
> of UFCS) were considered and turned down because D did not want
> to get amidst discussions about adding Koenig lookup. UFCS does
> not do Koenig lookup.
I don't get it, aren't the current symbol lookup rules enough to
make free function operator overloads useful? To me it looks like
they are.
Sorry for digging up this thread, just getting irritated by a
restriction that seems pointless and arbitrary.
Overloaded operators would suffer from the same potential abuses
other methods are subjected to if UFCS was enabled, nothing more
as far as I can see.
More information about the Digitalmars-d-learn
mailing list