3 ms·
The 3 levels of indentation, is about being mindful of runtime complexity. For example, do you really need four or more levels of for loops in a function. This
by asciimov 5y ago
The 3 levels of indentation, is about being mindful of runtime complexity. For example, do you really need four or more levels of for loops in a function.
This "rule" is very domain specific.
If you are writing for the Linux Kernel. You should rethink your strategy if you need something that is very nested.
However there are places that where such nesting might be the favorable way to do a task so that the code maintains long term readability. Most often this is for something that runtime complexity isn't a important factor. I've seen this most often in document and report generation.