News for hackers. Stuff that matters.
Re:Access Control in Swift by wldlyinaccurate on Thursday July 24, 2014 @03:26AM (#8078513)
IMHO multiple inheritance is a bad solution to this problem. I would be more inclined to use a DI pattern and inject an event manager wherever it's needed.

Even when multiple inheritance is genuinely useful, it still feels dirty to me. PHP actually has a nice feature called traits, which is essentially compiler-assisted copy & paste. It means you can re-use code without duplication and without the confusion that multiple inheritance can bring.

There are no comments on this comment yet.