Feature request: Path append operators for strings

TommiT tommitissari at hotmail.com
Tue Jul 2 15:28:23 PDT 2013


On Tuesday, 2 July 2013 at 21:48:54 UTC, Walter Bright wrote:
> On 7/2/2013 1:47 PM, TommiT wrote:
>> Division operator for strings doesn't make any sense,
>
> That's why overloading / to do something completely unrelated 
> to division is anti-ethical to writing understandable code. The 
> classic example of this is the overloading of << and >> for 
> stream operations in C++.

I've never thought of it like that. At some point I remember 
writing a vector type which overloaded its binary * operator to 
mean dot product (or cross product, I can't remember). So, you 
can overload an operator, but you can't overload the meaning of 
an operator.


More information about the Digitalmars-d mailing list