Old name: How many classes per unit is desirable to have?
My question is specific to Delphi. I think that in Java and the C # world, a fairly common practice is usually one file for each class. I think this is the right rule to follow in Delphi, because in Delphi private members are not very private if you have more than one class in the unit.
So, I was surprised to hear from two different seniors (and probably more experienced than me), the programmers tell me that I am sharing my code too much. One of them said that I would not be shy to post 5-6 classes in a block.
Is there any problem with the “one class per module” rule that I don’t know about, which can guarantee and explain the reaction of these programmers?
source
share