3 ms·
I'm not sure that I agree 100% with all the points raised in this article, though that's possibly just a reaction to what reads to me as invective. Here's anot
by bunderbunder 8y ago
I'm not sure that I agree 100% with all the points raised in this article, though that's possibly just a reaction to what reads to me as invective.
Here's another bit of food for thought along those lines, though: If you take all the elements of what's typically considered to be good object-oriented design to their logical extremes, you end up with a bunch of objects that each have exactly one operation, and are configured at construction time. They may have some very simple internal state (think counters and caches), but you probably want to keep that to a minimum.
The end result starts to look very, very similar to functional programming. An interface with one method is essentially a function. Constructor arguments do basically the same job as closures. Etc.
When you're looking at things from that perspective, the big difference is that functional languages almost force you to work that way, whereas it takes consistent, conscious effort to do it in OOP.