[fpc-pascal] Delphi compatible anonymous functions

Michael Schnell mschnell at lumino.de
Mon May 26 09:52:19 CEST 2014


On 05/23/2014 05:46 PM, Craig Peterson wrote:
> On 5/23/2014 2:09 AM, Michael Schnell wrote:
>> 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.)
> I'm not sure exactly what you're asking/proposing.  Yes, there are
> alternative syntaxes for closures that might be more "Pascalish", but I
> want something that's compatible with Delphi because we need to keep
> using it on Windows for the foreseeable future.
Hmmm

"parallel loop" and "future" in fact _is_ "compatible with Delphi": here 
Delphi Prism. (It's not the fault of Lazarus, that Delphi is not 
compatible with itself :-( .)

The discussion has somehow moved from, "anonymous functions" do "OpenMP 
support".

I understand that "anonymous functions" is some kind of "syntax candy" 
for stuff that - with some additional typing - could be done without, 
"OpenMP support" is about allowing parallel work - especially useful on 
the now ubiquitous multi-processor boxes - by means of the rtl. 
"parallel loop" and "future" is about syntax candy for parallel 
execution  - e.g. via OpenMP.

So my question was about the real target of the discussion.

-Michael



More information about the fpc-pascal mailing list