Hacker News new | ask | show | jobs
by FpUser 1 day ago
>"Nonsensical levels of generality is one of the classic OOP pathologies"

I think it has nothing to do with OOP which I find very convenient for some domains and not so much or even opposite for others. These "Nonsensical levels" of anything is a disease which is called Architecture Astronauts Syndrome and victims apply it to any paradigm

1 comments

OOP can be convenient for prototyping a game because you can just write new stuff at high velocity like "yeah a cow is a pig but it's brown and drops leather, a skeleton is a zombie that shoots arrows, and a client is just a server with graphics". Figuring out the right decomposition right from the start can be harder.
It is usually possible to design a representation where cows and pigs are the same thing, either Animal class instances or equally unified other data structures, and their differences are data (e.g. weight, length, one of several colour patterns).