[fpc-pascal] [fpc-devel] Nested function closures

Ryan Joseph genericptr at gmail.com
Tue Apr 27 22:23:17 CEST 2021



> On Apr 27, 2021, at 2:17 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> It will *always* create an interface. It's just how the compiler will wrap it.

But why would it do that when we could use an alternate code path that uses nested functions instead? Maybe I'm not being clear but we can do BOTH depending the situation when one is better than the other. This is just an optimization that leverages existing features that are already in the compiler anyways. Seems like a no-brainer to me.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list