News for hackers. Stuff that matters.
Re:OOP: A practical alternative to Inheritance by karmakaze on Thursday March 09, 2023 @04:12AM (#35079544)
The diamond example "TA extends Student, Teacher" seems worse than OO or direct composition. It's either a compiler error or share everything that overlaps.

I would have made the sharing explicit during composition--a Teacher or Student is given the Person instance when constructed, so sharing or not sharing is decided at composition time. To enforce consistency use helper/static methods.

Re:OOP: A practical alternative to Inheritance by zeedude on Thursday March 09, 2023 @10:11AM (#35081987)
Not sure what you’re getting at, sharing here does for you exactly what you would do with explicit composition.