[fpc-devel] New feature discussion: for-in loop
Paul Ishenin
ip at kmiac.ru
Wed Oct 21 02:35:35 CEST 2009
Sergei Gorelkin wrote:
> Probably yes. A possibility to use any type which has certain
> methods/operators instead looks attractive, but I'm afraid it would be
> hard to fit that into existing compiler model.
Sorry, what is TIterator? Is this like to the previosly suggested
TIterator = interator(<Type>, MoveNext, Current)
end;
Btw, we can use some new 'enumerator'/'iterator' directive to mark
methods which return enumerators.
And only in delphi mode we will search for the GetEnumerator method.
Best regards,
Paul Ishenin.
More information about the fpc-devel
mailing list