In this particular case, it depends. If using a namespace alias
does the trick, by all means prefer it to macros, for all of the
usual reasons. But the two do radically different things. You
cannot open a namespace using its alias, i.e.:
namespace XYZ_ver1 {}
namespace XYZ = XYZ_ver1;
namespace XYZ { // Illegal!
}
This works with a macro; in fact, you can define the macro
before the namespace has ever appeared. If you need this, then
you need to use a macro.