2 ms·
'A long sequence of code that flows in one direction'. I guess I agree in that case but how often does that happen? Generally a 100 line method will have loops,
by cjfd 7y ago
'A long sequence of code that flows in one direction'. I guess I agree in that case but how often does that happen? Generally a 100 line method will have loops, ifs and be quite deeply nested. In that case it should be split. The most important benefit is that you get to give the smaller blocks a, hopefully, descriptive name. That way it becomes much easier to follow what is happening.