4 ms·
I always start a new project with all code in a single file then only split it out when I feel I gain more than I lose. Judgment call, and a tad subjective. On
by syngrog66 5y ago
I always start a new project with all code in a single file then only split it out when I feel I gain more than I lose. Judgment call, and a tad subjective.
One factor in favor of mono-file is its often easier to navigate around fast and do search/replace in a single file then across many. Believe me, I understand all the benefits of mutiple files too -- not my first rodeo -- but under right conditions not always a sin to have a "fat" file.
generally after a project has left its prototype stage and become more of a stable thing, primarily under maintenance, it should certainly be split out into smaller files with sensible module boundaries. Best in long term, and plays with version control better, and large teams doing concurrent mutations on the source tree.