Re: [fpc-devel] Delphi anonymous methods

2013-03-02 Thread vrt277
> === output end === > > But if I've understood you correctly I'll get the following instead: > > === output begin === > > 21 > 21 > > === output end === > Right You want to capture variable by value. For example lambdas in c++ have special syntax to choose how to capture. By reference or by va

[fpc-devel] Delphi anonymous methods

2013-03-02 Thread vrt277
Hi, I want to implement support of Delphi anonymous methods for fpc. As I know I should create good proposal. Fortunately Delphi already made half of my work. Proposal: all behaviour described in http://docwiki.embarcadero.com/RADStudio/XE3/en/Anonymous_Methods_in_Delphi should be implemented

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread vrt277
On 01/26/2013 12:27 AM, Michael Van Canneyt wrote: You are new on the list, and so probably do not know this, but I hate wikis. Wikis are - by and large - a perfect example of what goes wrong in IT and in Open Source: Lots of things get started. Few are actually finished. Probably you think wha

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread vrt277
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 develop

Re: [fpc-devel] for-in-index loop

2013-01-25 Thread vrt277
On 01/25/2013 07:07 PM, Michael Van Canneyt wrote: The use case presented is SO MARGINAL that it does NOT justify another language feature. What will you do if you have to iterate through keys of hash table ? c++ stl library have own solution for this: iterator returns structure called "pair"

[fpc-devel] for-in-index loop

2013-01-24 Thread vrt277
Hi FPC team, There is good proposed extension of for-in loop on fpc wiki: get enumerator Position if available . From my point of view it's essential part of iterators. Especially for data structures which store pairs of key and valu