[fpc-devel] New feature discussion: for-in loop
Alexander Klenin
klenin at gmail.com
Wed Oct 21 14:49:47 CEST 2009
On Wed, Oct 21, 2009 at 23:15, Michael Van Canneyt
<michael at freepascal.org> wrote:
> This is all just nitpicking. Iterators as a language construct are a very ugly
> hack to save some typing, no matter how you turn it. Nice maybe for
> languages with dynamic typing and so on, but really not on it's place in Pascal.
I beg to disagree.This is completely backwards -- like saying that
"while" loop is an
ugly hack to save some typing of "goto" operators.
Iterators and foreach loops are very important tools of structured coding.
The fact that "for..in" may be expressed in terms of lower-level primitives
does not decrease its importance, just like existence of "goto" does
not decrease
the importance of "while".
--
Alexander S. Klenin
More information about the fpc-devel
mailing list