[again] opSliceAssign

Ivan Senji ivan.senji_REMOVE_ at _THIS__gmail.com
Mon Feb 20 06:32:01 PST 2006


Jarrett Billingsley wrote:
> "Ivan Senji" <ivan.senji_REMOVE_ at _THIS__gmail.com> wrote in message 
> news:dtc6jm$1fhm$1 at digitaldaemon.com...
> 
>>I forgot why there isn't one yet? It's no more than a days work for Walter 
>>probably. :)
> 
> 
> I don't think he's ever actually commented on the issue.  But the general 
> consensus was that it's supposedly unclear whether the statement
> 
> a[0 .. 10] = 5;
> 
> Means "Get a slice of a, and assign 5 to all the elements in the returned 
> array" or "call opSliceAssign with the range 0..10 and the value 5."  My 
> thought is that the compiler can already figure out that

I think compiler knows enough for it to work. Well in the above case it 
would definitly be opSliceAssign or if it was missing an error like 
opSlice cannot be an lvalue, use opSliceAssign.

> 
> a[3] = 5;
> 
> Means "use opIndexAssign;" I don't know why opSliceAssign would be any 
> different.  Maybe it's somehow incompatible with array operations 
> (vectorization). 
> 

Don't know about that. But feels like it shouldn't be a problem.



More information about the Digitalmars-d mailing list