> On Nov 3, 2023, at 8:31 PM, Sven Barth <pascaldra...@googlemail.com> wrote:
> 
> If you need a catch all type, then you should use function references. There 
> is no need to invent yet another type.
> The only thing it can not handle is the assignment of nested function 
> pointers (in contrast to nested functions directly), because they can only 
> ever be used in a function that is below the one where the nested function 
> was assigned which is not a guaranteed property for function references.
> 

not always because it creates a heap allocated interfaces for every function 
they're used in, even if it doesn't escape the scope. Maybe this was fine for 
Delphi but they can't be used for anything real time outside of GUI apps. 

Regards,
Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to