Bring back foreach int indexes

Daniel N no at public.email
Thu Nov 30 11:58:05 UTC 2023


On Wednesday, 29 November 2023 at 15:48:25 UTC, Steven 
Schveighoffer wrote:
>
> For those who are unaware, this used to work:
>
> ```d
> auto arr = [1, 2, 3];
> foreach(int idx, v; arr) {
>     ...
> }
> ```
>
> But was removed at some point. I think it should be brought 
> back (we are bringing stuff back now, right? Like hex strings?)
>
> -Steve

what's the problem, add optional parameter to enumerate which 
defaults to size_t?

enumerate!int(xxx)





More information about the Digitalmars-d mailing list