I read RC Martin's Clean Code, and I try to make the most of his clean code suggestions.
But I'm not sure what to call related classes.
Let's say I have a class called TreeDirectoryList.
I want to reduce the implementation of this class in many smaller classes. Let's say I create a class called ParentIndexStack.
ParentIndexStack will implement functionality highly dependent on TreeDirectoryList, so it is very unlikely that this ParentIndexStack implementation will be useful with any other class in the future.
But the name ParentIndexStack is very common, it is possible that I will need another class with the same name within the same project.
So, I thought that I would call ParentIndexStack more accurate, for example TDLParentIndexStack (TDL prefix from TreeDirectoryList ).
Will it be right?
I will finish many classes starting with TDLxxxxx.
source
share