> Your statement is not entirely correct. > > If one uses namespaces properly, then only one header file would have to > change. For example, putting the following two lines into a project's > configuration file (or a custom, per project version of RConfig.h, for > example) is all that is required for a user to use a namespace-enabled > version of ROOT without having to change a single line of code in any user's > file: > > namespace ROOT = ROOT_2_25_03; > using namespace ROOT; > > Please don't scare user's with statements like "many hundreds of header > files, many in production code, which would break if this was done". Your > statement is simply not true (unless you haven't bothered to learn about how > to use namespaces). I know how to use namespaces. However, one of the cardinal rules of using namespaces is: Don't put 'using namespace' declarations into header files. because that creates exactly the scoping conflicts that namespaces are designed to avoid. (You can put them into implementation files, because there the individual .cxx file will presumably not be included by unknown users, and if a conflict arises the implementor of the .cxx can figure it out.) That's why I didn't even consider your solution. However, I agree that doing this as a solution for current users is no worse (though also almost no better) than just having the Root classes in the global namespace, so I retract my statement that the cure is worse than the disease. However, to do it 'right' for existing code, I stand by my claim of extensive changes to many many files. George Heintzelman gah@bnl.gov
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:33 MET