Inheritance + Mixins *with* another solution
In previous post i was talking about some alternatives to classical IoC/DI. I`m not here to argue whats bets or worst, the 2 approaches have advantages and cons. Most classical OO languages like JAVA and .NET tend to fix things at runtime. Java for instance all happens in runtime, spring context. JSF context, Hibernate/JPA context, reflection(memory), CGlib, proxies, etc.. In FP languages that are children of haskell like F# and Scala things tend to happen as much as possible close to the compiler and thats has good and bad things like everything in life. In java or .NET you dont have multiple inheritance like you do in C++. So another approach would be do inheritance and work with the ideas of Modules. Some people call this: Thin Cake Pattern, for me is just multiple inheritance with syntactic sugar. As long as you do it only for classes/traits and dont do it for values i think is ok and IMHO cleaner than the cake pattern.