[fpc-pascal] for..in loops?

Florian Klaempfl florian at freepascal.org
Sat Nov 19 10:52:52 CET 2005


Micha Nelissen wrote:

> On Fri, 18 Nov 2005 13:18:40 -0800 (PST)
> Alan Mead <cubrewer at yahoo.com> wrote:
> 
> 
>>fpc 2.0.0 doesn't compile this... are "for..in" loops in a newer
>>version or will they be sometime soon?  Here is a little blurb about
> 
> 
> FPC will never support this, AFAIK. It doesn't really add anything new, it
> just shortens the code somewhat. Only in toy examples is it nice, in
> practice it doesn't really matter. We should try to keep the language as
> small and clean as possible.

If somebody shows me how I can walk e.g. a linked list with foreach ... 
in ... do with the same speed as with p:=p^.next; then we'll add it :p

However, we're currently concentrating our efforts regarding language 
features on stuff which gives you a real gain like templates and 
language supported multithreading, not some useless thing invented by 
Borland to have something new in D2005.



More information about the fpc-pascal mailing list