[fpc-devel] Delphi anonymous methods

Martin lazarus at mfriebe.de
Mon Mar 4 17:45:58 CET 2013


On 04/03/2013 16:05, Alexander Klenin wrote:
> Both "lambda" and "as" keywords are quite debatable, of course.
>

IMHO the existing procedure/function keywords should be kept. But with 
the requirement of using a defined type

Foo(  function as TVisitor; Result := x+5 end; );

or
Foo(  function as TVisitor; begin Result := x+5 end; );
Foo(  function of TVisitor; begin Result := x+5 end; );

or even
Foo(  function TVisitor( Result := x+5 )    );


or anything alike



More information about the fpc-devel mailing list