Re: [Phix] Language Feature Request: For Each
- Posted by _tom (admin) Dec 13, 2021
- 1141 views
euphoric said...
petelomax said...
euphoric said...
Why "for i"? (It seems redundant.)
There has to be an index (how else do you suggest it iterates down a sequence?),
I guess I'm not sure why it has to be user-facing. Sure, you have an index behind-the-scenes, but I, as a user, don't ever need it with this construct.
See tom's Python example. No user-facing index variable...
- { i, key, value }
does give you a user facing index
- if you follow the pattern
{} implies do not enter the loop
be well _tom