I am writing a C ++ program that has a large number of classes. In my head I can present them as separate collections. For example, there is a set of classes for reading and storing configuration data and another collection for drawing a user interface with various widgets.
Each of these collections can be neatly stored in separate namespaces, which seems reasonable. The configuration part has a “screen” class, and the GUI part also has a “screen” class, but they are different from each other. I could rename one "gui_screen" and another "config_screen", but what is the point of the namespace right? To remove these prefixes, we come up with to separate things.
Part of me then thinks that it would be neat to store these namespaces inside one core, so that none of my codes could interfere with the namespace of anything else. And I suppose that could also make the code more readable.
Or am I just doing too complex data hierarchies for no reason?
source
share