[fpc-devel] Delphi anonymous methods

Sven Barth pascaldragon at googlemail.com
Sun Mar 3 16:26:53 CET 2013


On 03.03.2013 15:09, Alexander Klenin wrote:
> On Sun, Mar 3, 2013 at 11:21 PM, Sven Barth <pascaldragon at googlemail.com> wrote:
>
>>> This will also help to split implementation.
>>> 1. Implement Sven's proposal. Anonymous functions which can capture
>>> local variables only by value.
>>> 2. Create Delphi-compatible capturing by reference.
>>> 3. Discuss and implement short lambdas syntax.
>>
>>
>> Yes, this can be seen as a plan. We also need to think about a approbiate
>> syntax for 1 before this step can be done. And I'd also like to know what
>> other core devs think about this. I myself would support this though.
>
> I agree with the plan. But I am not sure about the order -- perhaps
> implement Delphi-compatible variant first, since it have to be done anyway,
> and there is already a spec for it.

Implementing the Delphi compatible behavior first might prohibit the 
alternative behavior. So first an analysis step should be added to 
evaluate how the two ways can be implemented without prohibiting one of 
the two ways.

Regards,
Sven




More information about the fpc-devel mailing list