Operator overloading through UFCS doesn't work
Maxim Fomin
maxim at maxim-fomin.ru
Sun Oct 14 00:01:41 PDT 2012
On Saturday, 13 October 2012 at 19:50:02 UTC, Timon Gehr wrote:
> On 10/13/2012 06:02 PM, Maxim Fomin wrote:
>> ...
>> Different groups of people have different mind and same things
>> produce
>> different sense on them. From my point of view operator
>> overloading
>> methods are special functions and not treating them as
>> candidates for
>> UFCS does make more sense.
>
> I do not understand how an operation that happens to be called
> '+' is fundamentally different from an operation that is called
> 'add'.
The first one is an operator, which sometimes, may be rewritten
to function call, the second one is a function call.
>> Even if you convince in your opinion,
>> language addition without applied purposes makes no benefit.
>
> I guess the functionality could be achieved in DMD mostly by
> removing
> code. (Code for good error messages excluded!)
I don't understand what you are trying to say. Anyway, you can
write a pull request and propose it at github. It would be
interesting to see reaction of others.
More information about the Digitalmars-d-learn
mailing list