Multiple Inheritance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple Inheritance

Sean P. DeNigris
Administrator
I was just thinking about all the freedom brought by stateful traits, and the
thought occurred: why not just simplify and remove another hurdle by having
multiple inheritance with the conflict resolution and scoping of traits?

Forgive me if I'm missing something obvious…



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: Multiple Inheritance

Esteban A. Maringolo
Are you in the "release the Kraken" mood? :)

I haven't used stateful traits, and barely traits at all (when I wanted
to use it extensively the tools weren't ready).
But I see Traits more as a mix-in approach, rather than a multiple
inheritance one.

Also, in my experience building software with Smalltalk, I didn't have
the need to use multiple inheritance, but I did have the need to reuse
some behavior like Singleton, "named objects" (implementors of
#name/#name:), and have "Interface" like behavior (as in Java's
`implements ABCInterface`) I can query, and all that can be done with
Traits and, IMO, it better represents the purpose of a "trait" rather
than a multiple inheritance mechanism.

Regards!


On 09/04/2018 11:09, Sean P. DeNigris wrote:

> I was just thinking about all the freedom brought by stateful traits, and the
> thought occurred: why not just simplify and remove another hurdle by having
> multiple inheritance with the conflict resolution and scoping of traits?
>
> Forgive me if I'm missing something obvious…
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Developers-f1294837.html
>

--
Esteban A. Maringolo