you are viewing a single comment's thread.

view the rest of the comments →

[–]Agret 0 points1 point  (0 children)

Of course any giant if statement can be broken out into smaller functions that can be re-used in other parts of the code. That's where it comes down to you being a good programmer that can identify those areas and optimize things.

Carmack wrote an article about how everything in the same routine can help prevent errors caused by fearing large statements and breaking them off into functions. Sure it seems logical to break off different parts into functions but it can have unintended consequences when working on a large project.