in reply to One Big Script v. Several Small Scripts
Whether the mode-specific subs are stored in separate source code files may be a question of optimizing load time, or may just be a matter of stylistic preference, but in any case, the path to writing code that is minimal, optimal and easy to re-use begins with proper factoring, and factoring is mostly a matter of decomposing and organizing the program logic into functional (or methodical) blocks -- i.e. subroutines.
(Officianados of OO would probably phrase it differently, but the overall thrust of the idea would be equivalent, I think.)
|
|---|