foreach(ref e; range)
{
}

On idea is to have `ref` foreach to say that you would like to iterate your range without copying. The syntax could be:

foreach(e; ref range)
{
}

or:
ref foreach(e; range)
{
}
At least it will not break existing code. But this means that in each case you should make a decision about `ref`/non ref.

Reply via email to