News for hackers. Stuff that matters.
Re:Complexity budgets by yoklov on Monday October 26, 2015 @10:18AM (#10451582)
There are several tradeoffs here. Yes, this has a readability benefit, and helps ease developers into the module, especially if they're not familiar with it to start with.

A good argument in favor of not breaking them into separate functions is available here[0], basically boiling down to the fact that splitting something into a separate function has the undesirable side effect of hiding the full scope (not in the programming sense) of what it does.

If this function is pure, this isn't a problem, but if it manipulates -- or even just accesses -- global state, you might call it when it's in a state that it doesn't expect, leading to subtle bugs. You also might move the call to it to a new location, not realizing the full scope of what it does (this is doubly true for removing calls).

[0] https://web.archive.org/web/20150926045718/http://number-non... (sad to see this site slip away ...)

Re:Complexity budgets by eru on Tuesday October 27, 2015 @12:23AM (#10456307)
I agree, all bets are off when manipulating global state. (Unless your type system tracks such manipulations in detail.)