[fpc-pascal] C-blocks
Ryan Joseph
ryan at thealchemistguild.com
Fri Nov 16 02:54:36 CET 2018
> On Nov 15, 2018, at 11:30 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> No, too many ways to do the same thing don't make things easier, not to mention that everything needs to be maintained. So this gets a definite "no" from me.
>
> Also the overhead for calling an anonymous function is only that for a virtual method call.
Do you mean if the anonymous function has no state it’s only a single function call?
After reading old forum posts it sounded like this was going to be implemented by some reference counted structure which was allocated on the heap and even using interfaces perhaps. Depending on how this is implemented it may not be possible to prevent them from capturing state if the anonymous function accesses variables in the parent scope.
How much of that is accurate?
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list