Re: Do you currently use namespaces?
- Posted by ken mortenson <kenneth_john at yahoo?com> May 26, 2008
- 1039 views
Matt Lewis wrote: > Classes only resolve the issue until you have multiple classes with the > same name. Perhaps in theory, but I've never actually seen a real world example (not that it couldn't happen.) Any class would normally have many properties and methods which would have no collision issues. For the class name itself, most classes are those the programmer defines so those aren't a problem. So 3rd party libraries are the only issue. What about them? If in the form of two DLL's with the same name, you just put them into two different folders. So that leaves a third party source library. Again, you could simply have the library in a separate folder. So I just don't see any possible problem with class name collisions. Devil's advocate, how could I intentionally create a class name conflict? Of course, in VB, class names and file names are the same and there is one class per file. That may not be the case if the classes are implemented in some different way. > I disagree with the main assertion, however. Time will answer that question as it invariably does. > I believe that > at this point it is totally possible to resolve any conflict with the > tools that we have. By this, I mean that it should be possible to combine > any [working!] third party code into a single application without having to > modify any of the third party code. I completely agree with this as a goal. > The information hiding is actually not *required* for this, though it could > make the job easier by reducing the amount of symbols available to any > particular scope. > > Matt Just as a principle, all symbols should have scope as limited as possible.