I find myself writing

foreach (_; 0 .. n)
    doSomething(); // no using the variable `_`

.

What about relaxing the syntax to allow

    foreach (; 0 .. n)

and/or

    foreach (0 .. n)

?

Thereby making the `ForeachTypeList` of `AggregateForeach` in the grammar rule [1] optional.

[1] https://dlang.org/spec/statement.html#foreach-statement

Reply via email to