There has been a lot of discussion lately regarding namespaces in POCO. Both the way how namespaces are defined, which is currently done with macros (shudder ), and the way, namespaces are, well, named.
I am seriously thinking about getting rid of the namespaces macros. After reflecting about it for some time, the main reason why I used them in the first place was just because I was so used to them.
There is one open question, and this is whether we should put everything into a top level Poco namespace, or not.
Personally, I think, one level of namespaces is enough in C++. C++ is not Java, where the runtime requires that everything is in a unique namespace. This is because in Java there is no linker involved, only a class loader. In C++, the developer has direct control over what’s getting linked to his application, so this alone greatly reduces the possibility of naming conflicts.
Nevertheless, with just one level of namespaces, there is a small chance for collissions, especially since we’re using four namespaces (Foundation, XML, Util, Net), and even more in the future.
So, the big question: Should we put everthing into a top-level Poco namespace? Tell me your thoughts!