3 ms·
My solution to the maximum line length problem is simple: if a piece of code has more than 3 level of indentation, I start to think about refactoring, and never
by IlliOnato 5y ago
My solution to the maximum line length problem is simple: if a piece of code has more than 3 level of indentation, I start to think about refactoring, and never let it have more than 5.
I find that any reasonably complex code with 5 levels of indentation becomes difficult to read, and with more levels the difficulty grows exponentially.
At least with languages I have significant experience, keeping the levels of indentation low never was a problem. But I never did serious amount of coding in LISP or Python, for example, so I don't know if this is practical in such languages.