3 ms·
Just my two cents. If your A, B, C are neatly separated, then good. But it's way too easy (especially for a "quick hack" type of programmers) to introduce hidd
by agapon 7y ago
Just my two cents. If your A, B, C are neatly separated, then good. But it's way too easy (especially for a "quick hack" type of programmers) to introduce hidden dependencies like a goto from the middle of A to the middle of B, or C depending on a variable that was implied to be internal to B. Having separate functions helps to avoid some of such accidental dependencies. But, of course, the functions can still "communicate" via the global state or a shared state in a mutable object.
- coredog64 7y agoHow many times has it turned into this: DoA(DoAllContext ctx);
- ebiester 7y agoThat tells me that DoAllContext should be a class itself that doA belongs to, or that DoAllContext should be on the class itself, and the method itself should be the class. This is, of course, when we're talking about programming in Objects.