3 ms·
Yes I have, and some even approaching 10kl. It's actually easier when you only have one "dimension" to worry about, and can simply scroll up and down instead of
by userbinator 4y ago
Yes I have, and some even approaching 10kl. It's actually easier when you only have one "dimension" to worry about, and can simply scroll up and down instead of having to jump around between functions, or worse, files.
That said, a lot of these huge functions were basically for implementing defined step-by-step processes, and comments delineated the sections as well as loop and condition ends.
- emodendroket 4y agoIt's not better unless the smaller ones do a poor job of breaking up functionality. One class owning, say, all the code related to making database calls is much better than a bunch of database code strewn throughout unrelated logic.
- UglyToad 4y agoI think I have realised after ruining a previous codebase with overeager abstraction. Most code should read like fiction, not a reference book. That is they should read top to bottom with minimal jumping around and information hiding. (Of course not in all cases, YMMV, etc)