DIP80: phobos additions

Wyatt via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 11 18:55:13 PDT 2015


On Friday, 12 June 2015 at 00:11:16 UTC, jmh530 wrote:
> On Thursday, 11 June 2015 at 22:36:28 UTC, Wyatt wrote:
>
>> 1) a set of operators that have no meaning unless an overload 
>> is specifically provided (for dot product, dyadic transpose, 
>> etc.) and
>
>
> I see your point, but I think it might be a bit risky if you 
> allow too much freedom for overloading operators. For instance, 
> what if two people implement separate packages for matrix 
> multiplication, one adopts the syntax of R (%*%) and one adopts 
> the new Python syntax (@). It may lead to some confusion.

 From the outset, my thought was to strictly define the set of 
(eight or so?) symbols for this.  If memory serves, it was right 
around the time Walter's rejected wholesale user-defined 
operators because of exactly the problem you mention. (Compounded 
by Unicode-- what the hell is "2 🐵 8" supposed to be!?)  I 
strongly suspect you don't need many simultaneous extra operators 
on a type to cover most cases.

-Wyatt


More information about the Digitalmars-d mailing list