3 ms·
> In reality we are never designing classes for a bookstore, shapes, or a animals. This 100x. Anyone who has tried to solve real world problems finds out a ver
by martijn_himself 11y ago
> In reality we are never designing classes for a bookstore, shapes, or a animals.
This 100x. Anyone who has tried to solve real world problems finds out a very small amount of code written fits the model where a class corresponds to a family of physical objects, and probably much less even fits the model of polymorphism.
95% of classes end up just being fairly random containers for data and behaviour and OO just does not offer anything of value.
- Kiro 11y ago> 95% of classes end up just being fairly random containers for data and behaviour and OO just does not offer anything of value. Thank you. I always feel I'm doing something wrong since my OO code always ends up like this.
- JustSomeNobody 11y agoThat's OK. As long as you're constantly refactoring. If you step back and look at how you're manipulating your data and you're like, "Ok, data comes in and I first turn it right, then I turn it left, then I flip it over... Ah! I might be able to use Pipes and Filters here!" You can then refactor your classes to be more organized.