[fpc-devel] for-in-index loop

vrt277 vrt277 at gmail.com
Fri Jan 25 14:26:15 CET 2013


On 01/25/2013 04:38 PM, Paul Ishenin wrote:
>
> You need to look at another Michael mail where he claims that he was 
> against for-in loop feature when it had going to be implemented. So no 
> suprise that he is against extending it now.
>
> Michael, please don't demotivate our potential compiler developers :)
>
> Let's look how suggested feature makes compiler worse. Some answers I 
> already know, some needs to be clarified:
>
> 1. Does it adds new (semi-)reserved words? No, index is already a 
> semi-reserved word which is used for property declaration. So scanner 
> will not be changed.
>
> 2. Does it influence other features than for-in loop? As I see, other 
> parts of compiler will not be changed.
>
> 3. Will it add much code which is needs to be supported? I don't know 
> but expect it will add not much. Vasiliy, can you put your patch 
> somewhere to look at overall compiler change?
>
> 4. Jonas, can you tell about for-in loop for objective-pascal dialect? 
> I know it implementation depends on some Objective-C classes. Do they 
> support current index/key return? Do you against 'index' extension for 
> ObjP dialect and in general?
>
> Best regards,
> Paul Ishenin
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
Hi Paul,

1. scanner will not be changed.
2. It will not influence other features than for-in loop.
3. Link located at end of message. You also can visit 
https://github.com/vkevroletin/freepascal/compare/master...key-value-iterator 
in your browser.
4. - (yes there is difficulty with Objective-C, it skipped in my pilot 
implementation)

P.S.
patch: https://docs.google.com/file/d/0B36IYx_6MNY6bzY2Sm9Hc3o5QlE/edit



More information about the fpc-devel mailing list