[fpc-devel] Delphi anonymous methods

Boian Mitov mitov at mitov.com
Mon Mar 4 18:12:02 CET 2013


I actually somewhat agree with that, except it is less readable since you 
can't follow the code flow in place but have to scroll up to see what will 
happen (in for each as example.)
Other than being more difficult to read it is otherwise the same.
If you can also pass pointers to it that exist after the function is exited, 
then it is virtually equivalent.

With best regards,
Boian Mitov

-------------------------------------------------------
Mitov Software
www.mitov.com
-------------------------------------------------------
-----Original Message----- 
From: Michael Van Canneyt
Sent: Monday, March 04, 2013 9:03 AM
To: FPC developers' list
Subject: Re: [fpc-devel] Delphi anonymous methods



On Mon, 4 Mar 2013, Boian Mitov wrote:

This is not correct.

For anonymous functions you do not need to declare a new class.
Just name a local method.
That means move a line, and put a name in front of it. No more, no less.

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




More information about the fpc-devel mailing list