Comment by k__
9 months ago
If you don't nest that much, big functions aren't so bad.
You can just scroll down and see what happens in a linear fashion.
9 months ago
If you don't nest that much, big functions aren't so bad.
You can just scroll down and see what happens in a linear fashion.
This is the Linux kernel approach, and is a big part of why the kernel uses 8-space tabs. It's generally very effective for understanding what is happening. I'm happy with a 200-line straight-line-with-error-handling function, while a monstrosity of 10 20-line functions that all do if-else is quite a bit harder to read. The latter is "clean code."