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

Sergei Gorelkin sergei_gorelkin at mail.ru
Wed Oct 21 01:44:33 CEST 2009


Vinzent Höfler пишет:
> Sergei Gorelkin <sergei_gorelkin at mail.ru>:
> 
>> 4) The syntax 'for element in list using TListIterator' is kind of 
>> redundant. I'd suggest:
>>    for element in list.GetForwardIterator do ..., or even
>>    for element in list.GetSubItems(arguments) do ...
> 
> Wat's the return type of those functions? TIterator?
> 
Probably yes. A possibility to use any type which has certain 
methods/operators instead looks attractive, but I'm afraid it would be 
hard to fit that into existing compiler model.


Sergei.



More information about the fpc-devel mailing list