Ok, apologies, I take the comment back.
Andrew Eddie

In my opinion, functional and object oriented programming can complement each other. However, some OO ideas were really big mistakes that every developer should be aware of and avoid:

  • Single ancestor class inheritance is the source of many OOP design problems: fragile base class, gorilla banana, duplication by necessity, etc…
  • `new` behavior that makes a switch to factories a breaking change couples callers to the class implementation
  • Instance or name based (nominal) type checking (e.g., `typeof`) leads to overly restrictive code, breaking substitution and checks across execution contexts.

Ignoring those shortcomings is unwise at best. I grew up with OOP. It’s my background.

I’m not saying OOP sucks. I use it frequently. I am saying there’s a right way and a wrong way, and it’s best to avoid the traps and pitfalls.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.