B
BigMan
I've come to the decision to use multiple namespaces for a very
specific reason:
I like to use descriptive names of UDTs and I sometimes come up with
long UDT names (and file names too, since I name a source file after
the UDT that is defined in it, if any).
I've also noticed, however, that certain types are related more than
logically but also lexically - they start with the same word (which
happens to be the basic concept that they relate to). So, these UDTs
can be grouped together into a namespace. Thus the leading word would
drop out and become the name of the namespace. This would shorten both
names of UDTs and names and source files.
There is a little caveat, however - when I drop the leading word out I
may come up with conflicting file names. Here's why: in spite of
relating to different basic concepts the UDTs defined in those files
have other, less important, concepts in common, which, or course, come
after the name of the first concept in the name of the UDT(and source
file).
There is, of course, at least two ways out of this situation:
1) give up descriptive names; I wouldn't do that for the time being -
I'm used to them and I find them convenient; besides, if names of UDTs
get really long, I tend to shorten them to acronyms (capital first
letters of each word) despite my desire to avoid acronyms in source
code;
2) put each namespace into a separate folder; this will avoid file name
conflicts and since names of UDTs will become shorter I can get some
acronyms back to their full form;
Option 2 seems to be the best one for now. Could anyone else share some
experience or give ideas about my problem?
specific reason:
I like to use descriptive names of UDTs and I sometimes come up with
long UDT names (and file names too, since I name a source file after
the UDT that is defined in it, if any).
I've also noticed, however, that certain types are related more than
logically but also lexically - they start with the same word (which
happens to be the basic concept that they relate to). So, these UDTs
can be grouped together into a namespace. Thus the leading word would
drop out and become the name of the namespace. This would shorten both
names of UDTs and names and source files.
There is a little caveat, however - when I drop the leading word out I
may come up with conflicting file names. Here's why: in spite of
relating to different basic concepts the UDTs defined in those files
have other, less important, concepts in common, which, or course, come
after the name of the first concept in the name of the UDT(and source
file).
There is, of course, at least two ways out of this situation:
1) give up descriptive names; I wouldn't do that for the time being -
I'm used to them and I find them convenient; besides, if names of UDTs
get really long, I tend to shorten them to acronyms (capital first
letters of each word) despite my desire to avoid acronyms in source
code;
2) put each namespace into a separate folder; this will avoid file name
conflicts and since names of UDTs will become shorter I can get some
acronyms back to their full form;
Option 2 seems to be the best one for now. Could anyone else share some
experience or give ideas about my problem?