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

Sven Barth pascaldragon at googlemail.com
Tue Dec 24 09:16:04 CET 2019

Ryan Joseph via fpc-pascal <fpc-pascal at lists.freepascal.org> schrieb am
Di., 24. Dez. 2019, 02:47:

> > On Dec 23, 2019, at 7:57 PM, Ryan Joseph <genericptr at gmail.com> wrote:
> >
> > I never heard of "mixin" before but I'll study the wiki.
> >
> > I assume that the compiler team has decided multiple inheritance is a
> bad idea correct? Personally I don't have enough experience to know but I
> see there is a need to delegate work between classes and share a common
> namespace. I'm happy with any way to achieve that.
> Here's what I got from reading. I saw this concept of "trait" from PHP
> (didn't even know it existed until now) and I think it would look like this
> in Pascal. From what I gather the "trait" is new kind of object that merely
> is injected into an object but it can't itself be allocated or assigned.
> Does that sound like what you had in mind?

Basically, yes, though of course syntax, implementation and behavior need
to be nicely defined first. For example there is the difference whether
something is added at declaration time of the class or the creation time of
the class (though that might be the difference between mixins and aspect
oriented programming).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20191224/1992614a/attachment.html>

More information about the fpc-pascal mailing list