3 ms·
No, that’s not better. What’s better is if you can change this: function big(a,b,c) Into this: nameableIntermediateState = smaller(a, b) finishUp
by erikpukinskis 8y ago
No, that’s not better. What’s better is if you can change this:
function big(a,b,c)
Into this:
nameableIntermediateState = smaller(a, b)
finishUp(c, nameableIntermediateState
This is better because there were things you were doing with A and B that had nothing to do with C.
That’s the ideal final state, where your big function doesn’t even know about C. However, refactoring often has to happen in phases, and so a pass through like the kind you wrote is sometimes a good intermediate step.
It’s about teasing apart names into smaller islands that the names never escape. If you are passing names between islands, there’s no value.