[fpc-pascal] Traits Proposal

Marco van de Voort fpc at pascalprogramming.org
Fri Feb 19 20:57:28 CET 2021


Op 2021-02-19 om 16:50 schr
> So the method resolution doesn't actually change the VMT table of the class, just the interface?

See it like this: An interface is a fragment of VMT. All methods of the 
interface are there in order.

If implemented right, it is like a pointer into the implementing 
classes' VMT table.

The IVT is a mapping of interface identifiers (in COM terms, GUIDS) 
mapped to the offset into the VMT they apply too.





More information about the fpc-pascal mailing list