News for hackers. Stuff that matters.
Re:The Man Who Carried Computer Science on His Shoulders by DrScientist on Friday January 26, 2024 @09:07AM (#39142702)
I think the main problem with OOP is that the classic animal/cat/dog type class hierarchy examples that are used in teaching are in fact hardly ever used in the real world - giving a very misleading view of how it's actually used in practice.

Most people using OOP languages prefer composition over hierarchies and I almost never see those complex class structures modelled on data ( for some of the reasons you give ).

In terms of evolvability - encapsulation - a key feature of OOP - is a key tool in enabling that.

Re:The Man Who Carried Computer Science on His Shoulders by microtherion on Friday January 26, 2024 @03:43PM (#39148023)
You're right that animal/cat/dog hierarchies are hardly ever used, but exposing students too early to DogFactoryFactorySingleton might cause lasting mental damage.