Are there some Delphi specific issues with "One class per file" rule?

Viewed 1710

Old title: How many classes per unit are advisable to have?

My question is specific to Delphi. I think that in Java and C# world it is a rather accepted practice to generally have one file per class. I think this is a good rule to follow in Delphi too, because in Delphi private members aren't really private if you have more than one class in a unit.

So I was surprised to hear from two different senior (and probably more experienced than I am) programmers tell me I divide my code too much. One of them told me to not be shy about placing 5-6 classes in a unit.

Is there some issue with "one class per module" rule that I am not aware of, that could warrant and explain the reactions of these programmers?

3 Answers
Related