Aparajita: "Absolutely. In fact it is more complete than most implementations, you can specify and begin and end index for ordered collections.” Sorry for the confusion. I was referring to 4D implementation, not A4D.
-- Douglas von Roeder 949-910-4084 On Fri, May 1, 2020 at 10:10 PM Aparajita Fishman via 4D_Tech < [email protected]> wrote: > > "Don’t be so quick to complain; you finally got ‘for each’ 10 years after > > the rest of the world (including Active4D).” > > Good point. So…you’re thinking that the feature set is complete? > > Absolutely. In fact it is more complete than most implementations, you can > specify and begin and end index for ordered collections. > > > > "I don’t know of a single language (and I have used at least 6) where > ‘for > > each’ is reversible.” > > This could be 4D’s chance to be a trendsetter! > > I don’t think it's worth it. Iterating in reverse is not a common > operation. > > > > it’s funny that we have such a handy looping construct yet I have write > > code to init and update my own index. > > If you need an index in a ‘for each’ loop, you should actually be using an > indexed ‘for’ loop. That’s the point of having ‘for each’ separate from > ‘for’: 90% of the time you don’t need the index and ‘for each’ is more > concise, but when you need an index a for loop increments it for you. > > - Aparajita > > ********************************************************************** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:[email protected] > ********************************************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

