On Tuesday, 16 March 2021 at 16:29:45 UTC, Imperatorn wrote:
On Tuesday, 16 March 2021 at 13:52:29 UTC, Per Nordlöw wrote:
On Tuesday, 16 March 2021 at 13:31:34 UTC, Imperatorn wrote:
foreach(0..n) could work. Why though.
When performing a side-effect n times.
Then why not just do:
auto ti
On Tuesday, 16 March 2021 at 15:02:54 UTC, Steven Schveighoffer
wrote:
On 3/16/21 8:49 AM, Per Nordlöw wrote:
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
On Tuesday, 16 March 2021 at 13:52:29 UTC, Per Nordlöw wrote:
On Tuesday, 16 March 2021 at 13:31:34 UTC, Imperatorn wrote:
foreach(0..n) could work. Why though.
When performing a side-effect n times.
Then why not just do:
auto times(alias F, T)(T number)
{
return number.iota.each!(_ =>
On Tuesday, 16 March 2021 at 12:49:13 UTC, Per Nordlöw wrote:
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 `A
On 3/16/21 8:49 AM, Per Nordlöw wrote:
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
On Tuesday, 16 March 2021 at 13:31:34 UTC, Imperatorn wrote:
foreach(0..n) could work. Why though.
When performing a side-effect n times.
On Tuesday, 16 March 2021 at 12:49:13 UTC, Per Nordlöw wrote:
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 `A