Just came across Wilde's Hypothesis:

"Object-orientated programs are hard to maintain."

And while the evidence for it seems to be shaky at best (even if I do somewhat agree with it), I do find the statement of it to be wonderfully salty.

Follow

@seamsay looks a bit superficial to me. I don't see the paradigm as decisive as test coverage, which I see as documentation of the intention behind the code. And OOP encapsulation (combined with mocks, monkey patching, etc) allows for relatively easy unit testing.

@mapto Interesting. I actually think that the need to use mocking and monkey-patching is one of the things that makes OOP programs (typical ones at least) harder to maintain, instead of just testing the behaviour of your program given some input you're implicitly introducing a whole bunch of extra logic and assumptions. Hard agree that good testing is one of the most important factors in maintainability.

Having said all of that, I agree that it is largely superficial because programming paradigm is way way way down on the list of things that affect the maintainability of a program.

@seamsay well, I don't think one "introduces" new logic with mocks, etc. I'd rather think one "externalises" relevant parts of the existing implicit logic (sometimes inaccurately, so needs refinement). This is why I wrote of intention

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.