[fpc-pascal] C-blocks
Ryan Joseph
ryan at thealchemistguild.com
Thu Nov 15 14:31:05 CET 2018
> On Nov 15, 2018, at 5:09 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> Unlike you I'm in active contact with the developer and the last message was only a few months ago.
That’s good news then but I’m not going to hold my breath. Best of luck to the man.
>
>
> Would it be permitted to add inline declarations of nested functions as a temporary replacement? They don’t capture state but at least they solve the issue of polluting namespace with named functions which you use in only one location. Better than nothing (since that’s what we’re realistically looking at) and no new complicated features.
>
> No. This would conflict with the work of Blaise. Also even if we'd add that now it would not make 3.2 as it would be a too invasive change. So the earliest release would be 3.4 and for that I plan to have the real thing integrated into trunk. Thus it would be wasted effort to add that now.
I just went back and read some of old threads of where closure support is at and it was mentioned that closures (i.e. what Delphi is calling anonymous functions) are actually a pretty heavy weight concept and require a non-trivial amount of overheard. Looking at the c-blocks implementation Jonas did the and RTL behind it confirms this to me.
Given that, having a light-weight “anonymous nested function” (not a “reference to” closure) is actually a nice compliment and in fact 2 different things. As FPC’s current c-blocks support demonstrates, it has closure properties but NOT anonymous functions (yet), which are indeed 2 distance concepts. Seems to be both are good to have.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list