3 ms·
If breaking up a procedure results in the creation of a bunch of smaller procedures that are only called once then I think I'd prefer to leave it as it was with
by barking 7y ago
If breaking up a procedure results in the creation of a bunch of smaller procedures that are only called once then I think I'd prefer to leave it as it was with well demarcated and commented sub-sections.
It saves you the job of inventing descriptive procedure names as well as jumping between procedures.
I seem to recall also that in Code Complete, Steve McConnell
claimed that there was an inverse relation between the length of a procedure and the number of errors per line of code.
- CuriouslyC 7y agoHow is an inline function different from a demarcated and commented subsection? It seems to me that the semantic and enforced correctness benefits of functions would make using them in this way a no brainer.