https://issues.dlang.org/show_bug.cgi?id=3395

Dmitry Olshansky <dmitry.o...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dmitry.o...@gmail.com
         Resolution|---                         |WONTFIX

--- Comment #7 from Dmitry Olshansky <dmitry.o...@gmail.com> ---
> So the idea is to give iteration distinct syntax:
> x[*]=y[*]; //copy slice
> x[*]=a; //assign all slice items
> f(x[*]); //rewritten as foreach(a;x)f(a);
> x[*]=f(y[*]); //foreach(i,ref a;x)a=f(y[i]);
> x[*]=f(y[]); //foreach(ref a;x)a=f(y.opSlice());
> x[][][][*]=a; //x.opSlice().opSlice().opSlice()[*]=a;

This is magic, and it's for arrays only. I believe by now it's clear we want
less of it, not more.

A solid DIP might get us something here but not much.

--

Reply via email to