<div dir="auto"><div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Ryan Joseph via fpc-pascal <<a href="mailto:fpc-pascal@lists.freepascal.org">fpc-pascal@lists.freepascal.org</a>> schrieb am Di., 24. Dez. 2019, 02:47:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> On Dec 23, 2019, at 7:57 PM, Ryan Joseph <<a href="mailto:genericptr@gmail.com" target="_blank" rel="noreferrer">genericptr@gmail.com</a>> wrote:<br>
> <br>
> I never heard of "mixin" before but I'll study the wiki. <br>
> <br>
> 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.<br>
<br>
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?<br></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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). </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>