Re: Do you currently use namespaces?
- Posted by Matt Lewis <matthewwalkerlewis at gmail.??m> May 26, 2008
- 1023 views
ken mortenson wrote: > > Jeremy Cowgar wrote: > > In addition, if you use namespaces, you can forget the fact 100% that > > anything > > is global throughout the entire program. For instance: > > > include FileA.e as a > > include FileB.e as b > > a:hello() > > b:hello() > > I see the point you make regarding the similarity in the following. However, > > what happens if FileA.e above includes FileC.e and FileB.e includes FileD.e > which both have hello(). Does your main file have to know to declare a > namespace for the includes withing files A & B? This violates the > principle of information hiding. The namespace that you use for a and b is also used to deconflict down through all of the includes of a and b, so a:hello() could refer to something in FileC.e. You are correct in that our ability to hide information needs some additional power. The local/global that we currently have isn't fine enough. Matt