3 ms·
Except complexity as an issue is primarily about readability. Fine, a junior developer has a switch statement that's like 10 things long within a function with
by kromem 3y ago
Except complexity as an issue is primarily about readability.
Fine, a junior developer has a switch statement that's like 10 things long within a function with several if/else branches and they refactor to meet complexity limits by moving the switch to a function.
As long as that function is well named, that's a huge improvement to readability.
In part, complexity thresholds relate to human short term memory limits of seven plus or minus two.