[Issue 9786] Allow [non-member|UFCS] implementation of operators
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Mar 30 08:27:27 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9786
timon.gehr at gmx.ch changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |timon.gehr at gmx.ch
--- Comment #6 from timon.gehr at gmx.ch 2013-03-30 08:27:22 PDT ---
(In reply to comment #5)
> Operator overloaded methods are special functions.
No, they are specially named normal functions with some syntax sugar support.
They can just as well be called as normal functions/methods. In this case, UFCS
already works.
> There are several problems with UFCSising them.
> ...
There are no issues not common to other functions. Operator overloading is all
about syntax. It is completely pointless to single out the operator overloading
functions in any other way.
The objections are simply invalid:
1) (template) functions can always be renamed, even if they happen to be named
eg. opBinary.
2) Druntime will _never_ catch up UFCS (template) functions anyway. It does not
matter if they are called eg. opUnary or toString.
BTW, I do not think this is an enhancement. According to the online docs and
TDPL, it should work.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list