4 ms·
Good point, but then again I'm not that sure it's a net benefit because I like everything in a codebase to refer to a given object using the exact same name. I
by jstimpfle 4y ago
Good point, but then again I'm not that sure it's a net benefit because I like everything in a codebase to refer to a given object using the exact same name.
I suppose aliasing is useful for widely used libraries, for example if a big software projects wants to include two different versions of the same library. Or Team A wants to rename their module but make it easier for other teams that use their module to follow suit.
All that can provide some ease of use in the short term but produces more mess to clean up in the long term. IMHO.
Real name clashes between two different libraries are quite unlikely, and namespaces would only solve that problem on the source code level, not on the binary / symbol level.