3 ms·
I agree. Many of the points made I disagree with personally. I don't tend to write OO. I like clear functional pipelines, putting state and side effects at the
by dgb23 5y ago
I agree. Many of the points made I disagree with personally. I don't tend to write OO. I like clear functional pipelines, putting state and side effects at the top (singleton like?), do static dispatch per default, because then I can clearly _see_ all the fundamental decisions and effects. Functions are easy to test, their "mocks" are just data structures.
Also on a slightly different note, the advice about using small constructors and non-defensive methods. That goes pretty much against the whole point of encapsulation IMO, which is to protect and more importantly guarantee invariants. What's the point of a class that doesn't do much of anything besides naming things?