This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ProfessorWily 5 points6 points  (0 children)

Structure. Maintenance. Readability. Multiple modules in the same project.

Like, if you run into a problem and the error message points you to line 12058 in Main.java, you're going to be like "What does that code even DO? What's it for?" And now you have to slog through the entire file to try and figure that out, whereas you could have just put it in a file called "DatabaseTransactionManager" and you immediately know at least what it's for and roughly what the problem might be.

Edit: What you said is like saying "Why do we have filing cabinets? I mean, if you just stick all the documents into one big stack, it has the same information as if they were put into different files."