
11 Sep
2009
11 Sep
'09
10:22 p.m.
if I understand you correctly, all libraries that software I write depends on, directly or indirectly, must be free of namespace conflicts. Is that correct?
Well, it may be more accurate to say that class instances have no namespaces, and are all implicitly global. When you import a module, you get all the instances it defines in the global namespace, whether you want them or not. Like I said, there was some argument with people on one side saying importing is a valid way of controlling instance visibility, and another side saying the fact that you have to import at all is an implementation artifact and instances should be considered global. Practically speaking, I buy the second argument more, for the reason you described above.