On Tuesday, 16 March 2021 at 12:49:13 UTC, Per Nordlöw wrote:
I find myself writingforeach (_; 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
foreach(0..n) could work. Why though.