access foreach index counter for Iterate n times
Mike Parker
aldacron at gmail.com
Sat May 21 02:35:37 UTC 2022
On Saturday, 21 May 2022 at 02:23:28 UTC, mw wrote:
> My point: the language should be more consistent.
You get indexes in a foreach with arrays and associative arrays
because they have indexes. You don't get them with input ranges
because they have no indexes (hence, the need for enumerate). So
is it really in consistent that a numeric range of 0 .. N has no
index?
More information about the Digitalmars-d
mailing list