DIP 1022--foreach auto ref--Community Review Round 1
rikki cattermole
rikki at cattermole.co.nz
Thu Aug 8 12:38:51 UTC 2019
- In the first alternative a disadvantage is listed but no advantages.
An advantage of it is that there would be no breaking changes unlike the
proposed solution which has an unknown amount of breakage.
If we could get an idea of the severity (1-2 modules vs half vs almost
all of Phobos) of the breakage being proposed, that would great.
- What is the interaction with indexes? No mention of them, nor example.
- The examples you have may look good for an implementer, but for
everybody else perhaps some examples using concrete types that ignore
the foreach body would be a good edition. Just to make it clear what
we're getting out of it. I.e.
RangeWithoutRefFront expr; // T front()
foreach(v; expr) // ok
foreach(ref v; expr) // Success but will be error after deprecation
foreach(auto ref v; expr) // ok
More information about the Digitalmars-d
mailing list