[fpc-pascal] for..in loops?

Lukas Gebauer gebylist at mlp.cz
Sun Nov 20 12:29:41 CET 2005


> foreach ... in ... do adds no additional abstraction layer. I consider
> foreach usefull if it allows to create own iterators which are as fast as
> walking a linked list with p:=p^.next; Especially since it then allows
> e.g. to write iterators with data prefetching.

Just my two cents:

For-in loops is standard part of Delphi-2006 pascal language. (Not only 
for .NET, it is for Win32 too!)

I think, if Freepascal wish to stay Delphi compatible, then is good idea 
to implement this features too. Look to next Pascal language enhancements 
in Delphi-2006... (like operator overloads or class variables...)


--
Lukas Gebauer.

E-mail: gebauerl at mlp.cz
WEB: http://www.ararat.cz/synapse - Synapse Delphi and Kylix TCP/IP 
Library





More information about the fpc-pascal mailing list