[fpc-devel] New feature discussion: for-in loop

Michael Van Canneyt michael at freepascal.org
Tue Oct 20 11:30:57 CEST 2009



On Tue, 20 Oct 2009, Florian Klaempfl wrote:

> Michael Van Canneyt schrieb:
>>
>> Secondly:
>> You promote a certain class/interface to a language feature. The
>> compiler then depends on the presence of a certain class with some
>> 'known' methods in the RTL.
>>
>
> The whole interface ref. counting depends on that as well as e.g. the
> "as" operator.

I know, I said this also in my remark that they did this already for
some interfaces (ref counting) and TObject...

> My opinion about the for-in loop:
> - I won't implement it
> - if somebody else implements it in a delphi compatible manner: fine
> - if somebody else implements it in a delphi compatible manner solving
> the flaws: great
> - if somebody else has ideas how the existing classes can be extended
> without drawbacks by more sophisticated iterators, go ahead, this won't
> interfere with Paul's stuff

If the largest part of the compiler team has no problem with it, I will
of course not refuse it. Although I would definitely request to allow the 
delphi-compatible solution only Delphi mode, and only to allow a *decent*
implementation in ObjFPC mode.

Michael.



More information about the fpc-devel mailing list