[fpc-devel] Delphi anonymous methods

Sven Barth pascaldragon at googlemail.com
Tue Mar 5 14:11:08 CET 2013


Am 05.03.2013 12:29, schrieb Alexander Klenin:
> This is why I propose the following plan:
>
> 1) Implement Delphi-like anonymous functions syntax, without closures
> 2) Implement Delphi-like by-reference closures
> 3) Implement ObjFPC-specific named closures with explicit by-value/by
> reference options
> 4) Implement ObjFPC-specific shortened syntax
>
> Discussion of ObjFPC extension may continue while the implementation
> of (1) and (2) is in progress.
>
I basically agree. Though for now anonymous functions should be either 
bound to mode Delphi or at least a modeswitch (enabled by default in 
mode Delphi and disabled everywhere else). [or maybe we should add such 
newer extensions to mode DelphiUnicode?] The type "reference to ..." 
should be available in either mode though (independantly of anonymous 
functions).

Regards,
Sven



More information about the fpc-devel mailing list