The coolest thing about for-in is that you can implement it for any custom class or record by implementing an iterator. So, f.ex., you can have `for jsonval in JSONDoc.Values['somearray']`. For-in works for strings as well iterating by chars though I personally haven't used it in such way.
And it's a bit slower so for time-critical routines usual `for` still remains actual (though for very super time-critical things pointer increasing could beat `for` anyway)
dummzeuch replied to dummzeuch's topic in GExperts
That's actually one change I made over Easter: The Formatter does no longer insert a blank line between a comment and the procedure it describes.
Are there any other experts in GExperts that do this?
I only rarely use for-in, perhaps I should try using it more often. I only use it for enums, I never thought you can use it for TList, even though it makes sense. Good thread @John Kouraklis , good ideas coming out of this! 🙂