[fpc-devel] for-in-index loop
Graeme Geldenhuys
graeme at geldenhuys.co.uk
Fri Jan 25 00:13:50 CET 2013
On 01/24/13 19:36, Alexander Klenin wrote:
>> Enumerators are not iterators.
> Eh... actually, they are? Why do you think otherwise?
Enumerators are limited in functionality. Iterators are the full-blown
thing. Common Iterator API is something like Next, Prev, Reset, HasNext,
HasPrev etc. Enumerators normally just advance and only in one
direction. This is how it is in many frameworks. Even Java's
documentation describes it like that - see the bottom of the page for
Iterator.
http://docs.oracle.com/javase/6/docs/technotes/guides/collections/reference.html
Regards,
- Graeme -
More information about the fpc-devel
mailing list