A possible solution for the opIndexXxxAssign morass

Robert Jacques sandford at jhu.edu
Tue Oct 13 10:27:06 PDT 2009


On Tue, 13 Oct 2009 13:08:59 -0400, Andrei Alexandrescu  
<SeeWebsiteForEmail at erdani.org> wrote:

> Bill Baxter wrote:
>> Huh? It didn't sound to me like it would get rid of anything, except
>> for the use of the word "index" in many methods that have to do with
>> index operations.  That just seems confusing to me.   I think the
>> opIndexXxxAssign functions may need to be added, but adding them by
>> overloading existing names doesn't seem a win to me.
>>  --bb
>
> That's a good point. But something is inherently problematic about name  
> explosion (In the proposed solution there is still an explosion in the  
> count of functions that need to be written.)
>
> Now I realize there's also a need for opSliceXxxAssign, bleh. Unless we  
> ascribe a distinct type to a .. b.
>
>
> Andrei

A distinct type for a..b is needed to support the mixed slicing and index  
that occurs in Nd-array/Matrixes: i.e.
auto row0 = myMatrix[0,0..$];



More information about the Digitalmars-d mailing list