>>13
this problem can be solved pretty effectively with modularity. As long as imperative functions look simple and predictable from the outside, things can remain pretty manageable for use. But if the function is 800 lines long, with loops in loops with continues and breaks all over, it will be very difficult to add additional features, or to effectively test every possible case the function is meant to handle. That tends to be easier in functional style, as the logic is more explicit. In imperative, it can become more compressed, and implicit, and many invariants are held in between the lines, or in between the statements.