[fpc-pascal] Interface delegates and the implements property specifier

Ryan Joseph genericptr at gmail.com
Fri Dec 27 17:36:27 CET 2019

> On Dec 27, 2019, at 8:21 AM, Adriaan van Os <fpc at microbizz.nl> wrote:
> The code of a "mixin" or "trait" or "delegate" (or whatever implementing-something) can be referenced and it can put virtually into the namespace of an object. The one thing you cannot do however, is copy the code, because then the basic problem of mutiple-inheritance pops-up again --- which is what route for virtual methods to take in a multiple-inheritance "tree" that is no longer a tree but a graph. For the same reason, methods overriding methods imported from the implementing-something will still actually override the methods in the implementing-something, even if they virtually seem to be in the namespace of the importing object.

Should the traits/aspects even be overridable then? If they are it sounds like they need to be implemented the same as inheritance and this would basically just make them a different syntax for multiple inheritance. I don't think that's what Sven had it mind and if he did why not just do proper multiple inheritance using the existing syntax that interfaces uses?

	Ryan Joseph

More information about the fpc-pascal mailing list