http://qs321.pair.com?node_id=66515


in reply to Hacking with objects

OO in your program is like mustard on a ham sandwich. You can get by without it, a little can make things a lot better, and too much gets you a mustard sandwich.

Unfortunately, OO has been such a buzzword over the years, there are a lot of mustard sandwiches out there. I've have spent more time in my career undesigning pointlessly complex object hierarchies than I have designing my own. There is something about OO that causes people to just go crazy and design these worthlessly ornate OO constructs. I think it is because while everyone knows the advantages of OO, but very few know its drawbacks. You have to understand both to know when to use OO, and how much is appropriate.

I counsel OO minimalism. Start with a small set of core objects, and add new OO trappings only when your code speaks to you with a voice unwavering.