Re:Fixing C
by JulianMorrison on Tuesday April 12, 2016 @06:35AM
(#11478393)
If it's embedded code, it's quite possible you can't just decompose code into little bitty chunks to avoid nesting, because your maximum stack depth is fixed and very small.
[ Parent
| on HN ]
Inline functions.
It is also definitely possible to go overboard with chopping up your code. I'm sure everyone has read that file where damn near every single line ended up in its own little function (in its own file with some big framework around it) and you're jumping all over the place trying to figure out what its actually doing.
Everything should be made as simple as possible, but not simpler.
>I'm sure everyone has read that file where damn near every single line ended up in its own little function (in its own file with some big framework around it) and you're jumping all over the place trying to figure out what its actually doing.
Sounds like node and its moronic packaging ecosystem.