On Fri, Jan 25, 2013 at 4:45 AM, Michael Van Canneyt
<mich...@freepascal.org> wrote:
> Enumerators are not iterators.
Eh... actually, they are? Why do you think otherwise?

> If you want a full-fledged iterator, you should use classes.
Enumerators *are* classes, except for built-in ones.

> The for syntax is not meant for that.
That's debatable.
There is no for-index support in Java, but there is in most (all?)
other modern languages --
Python, PHP, Ruby, etc.
I suggest that Java is inferior in this regard.

>If you want full fledged iterators, use classes.
Please provide example of your suggesion for the case in the wiki.

--
Alexander S. Klenin
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to