[fpc-pascal] Traits Proposal
Ryan Joseph
genericptr at gmail.com
Wed Feb 17 02:21:17 CET 2021
> On Feb 16, 2021, at 3:35 PM, Benito van der Zander via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>
> But it is not calling the method, it is calling the wrapper function
what you say wrapper function do you mean the ref counting functions when you pass around the interface?
I guess for ref counting you're supposed to cast the class to the interface (which is an expensive runtime lookup) and then pass that thing around? That seems like a crazy way to get ref counting plus you need to cast the interface back to the class if you want to call other methods? I still don't get this pattern. ARC should be handled by the compiler and be on the class itself, not some additional object you need to create and then store.
Regards,
Ryan Joseph
More information about the fpc-pascal
mailing list