|
i like the section about namespace justifications in books, claiming that potential name conflicts are the problem. they are *not* the most important problem. i used to explain and teach namespaces using this approach in the beginning, but moved away from it because i recognized that this creates a very wrong image of namespaces in the minds of people given this explanation. i think namespaces should not be explained that way.
namespaces are about identification, and avoiding name clashes is just a (useful) side effect. the identification part is the part which is essential and which makes namespaces indispensable, however ugly they may be. and i think that a lot of namespace backlash is caused by people explaining them badly. this does not mean that they do not have their very ugly parts, they certainly do, so let me conclude with what every wanna-be cool web person has to say:
i hate namespaces!
(actually i don't, but they are surprisingly hard to understand and explain and teach properly, given how simple they really are.)
cheers,
dret.
|