Think about C++ classes and files. If you have 3 classes like A, B and C, it is
common practice
to have them defined in 3 header files in particular if they are complex
classes, even if both B and C inherits from A.
And hardly anyone would try to put the 3 of them in a single header file, even
though C++ completely support having an
arbitrary number of classes in a single file.

If I have a significant class that is best implemented with a number of
other insignificant, one-off classes, I am not going to give each one their own

The QRegExp class implementation (5.7) is a good example.
The file contains 10 helper structs. (struct is
the lazy man's class.) Development of QRegExp would not have
benefited from giving each one it's on header and source file.

Interest mailing list

Reply via email to