On 03.03.2013 12:26, Vasiliy Kevroletin wrote:

Maybe specifying how a variable should be captured would be a solution
that can satisfy both worlds...

Good.

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.

And I'll also ask Blaise whether he can commit the missing code so that you could in principal use his work as a base.

Regards,
Sven

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to