[fpc-pascal] "Is nested" vs "of object" compatibility with global functions
Hairy Pixels
genericptr at gmail.com
Sun May 29 10:19:43 CEST 2022
> On May 29, 2022, at 2:26 PM, Martin Frb via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> Actually afaik you push an extra param in for "is nested" as well as for "of object.
>
> But for "of object" it is the first param, for "is nested" it is the last.
Then “references to” is the only universal function pointer type now (which is great) but since it’s a heap constructed class it’s about 4 times slower than the other ones. I still think FPC needs a universal stack based function pointer type which works with objects, nested and global functions. Michael hinted to how that could be done but it sounds like this all legacy baggage from Delphi.
Ideally the programmer only has to consider “does it leave the scope or not” and not have to worry about these other 2 is nested/of object types. I can’t even think of any other language that has so many function pointer types which are visible to the programmer (even c++???).
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list