Reputation: 11
Usually when we are coding we are suggested to limit the number of lines in a source code file. We are not allowed to make a source file too long. What are the reasons for this?
Is there a technical reason or it just for good readability ?
Upvotes: 0
Views: 45
Reputation: 49883
If your whole program is one source file, then this restriction seems kind of silly. But when you are allowed to break it up into multiple files, then this may be a ham-handed way to force you to break things up into logical pieces, which helps keep things organized and, for really large projects, can speed up builds (as not all files will need to be re-built every time) and facilitate dividing the work between multiple people.
Upvotes: 1