[fpc-pascal] Delphi compatible anonymous functions

Michael Schnell mschnell at lumino.de
Fri May 23 09:09:01 CEST 2014


On 05/22/2014 06:17 PM, Craig Peterson wrote:
> This is exactly the "data marshalling" I was talking about.
.. And what you seemingly want to avoid.

I suppose "technically" this method - especially when using the "event 
record pool" Marco mentioned - does not seem to have any great 
disadvantages.

As said, for the user some syntax candy might be beneficial.

rather simple:
  - declaring the event method as something like "closure" resulting it 
having it do an auto-free on exit.

more advanced (needing the RTL to provide pool of threads to fire on 
demand):
  - "parallel loop" and "future" support like in "Prism"

(In fact I don't see "anonymous functions"  - see thread topic - here.)

What do you think,
-Michael



More information about the fpc-pascal mailing list