Re:The faster you unlearn OOP, the better for you and your s...
by scarface74 on Sunday November 25, 2018 @11:14AM
(#18527424)
The information hiding and namespacing aspects of objects are really useful, both in theory and in practice. It's just that I think that implementation inheritance is an imperfect way of facilitating code reuse and not something you should teach to new students...
And most professionals agree with you. “Prefer aggregation over inheritance.”
Which by the way Resharper makes really easy. You add a private variable to your class of the type you want to aggregate and it creates wrapper methods in your aggregating class that just calls your other class.
And most professionals agree with you. “Prefer aggregation over inheritance.”
Which by the way Resharper makes really easy. You add a private variable to your class of the type you want to aggregate and it creates wrapper methods in your aggregating class that just calls your other class.