digitalmars.D - [again] opSliceAssign
- Ivan Senji (2/2) Feb 20 2006 I forgot why there isn't one yet? It's no more than a days work for
- Jarrett Billingsley (12/14) Feb 20 2006 I don't think he's ever actually commented on the issue. But the genera...
- Ivan Senji (5/27) Feb 20 2006 I think compiler knows enough for it to work. Well in the above case it
I forgot why there isn't one yet? It's no more than a days work for Walter probably. :)
Feb 20 2006
"Ivan Senji" <ivan.senji_REMOVE_ _THIS__gmail.com> wrote in message news:dtc6jm$1fhm$1 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 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).
Feb 20 2006
Jarrett Billingsley wrote:"Ivan Senji" <ivan.senji_REMOVE_ _THIS__gmail.com> wrote in message news:dtc6jm$1fhm$1 digitaldaemon.com...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.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 thata[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.
Feb 20 2006