-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
One namespace on the whole project #272
Comments
I'm not convinced of the value of this change. To me it feels like it would decrease discoverability of classes by introducing unnecessary structure. I'm open to hear arguments. |
I never thought to do otherwise. This library is the first I see with a single namespace all over projects. (I do not count Tests & Demo) For me it brings clarity. When I want to use a type, I know where it comes from. A simple example is hypothetical type An example is I do understand that since you have got used to it... |
This sounds like it would introduce a lot of churn to the codebase and force a lot of downstream consumers to react to a change with no benefits. I'm unconvinced. |
I recently noticed (felt) a tiny benefit. When you add a new public type to the codebase consumers of the library have 100% chance that they will got "hit" by it when they have the type of the same name in the current scope. With namespace-per-folder, you have better damage control. Single namespace has a feeling of the "god" file - everything in a single file. I understood your point of view. Feel free to close the issue if you want. |
In principle, having namespaces match the folder structure is not a bad idea, but there are also downsides. Any restructuring of the folder structure breaks that guideline unless you also rename the namespaces. In my work I decide on a case by case basis, often when I move code files into a subdirectory I adjust the namespaces only if the restructuring has meaning beyond simple file organization. |
Hi,
I did notice that the project define only one namespace (Fido2NetLib). It is a general practice, that namespaces match to folder structure. Do you mind, if I fix it?
The text was updated successfully, but these errors were encountered: