Re: Do you currently use namespaces?
- Posted by ken mortenson <kenneth_john at y?ho?.com> May 26, 2008
- 1020 views
Jeremy Cowgar wrote: > ken mortenson wrote: > > > > You say myprog.ex can't access a:hello() in any way. Got that. But again, > > a include c, b include d. If I understand correctly, then myprog.ex could > > call c:hello() or d:hello() even though they are not declared in myprog? > > > > If so, this is not a good module. However, I get the impression this is > > still an issue under discussion. I'd like to see how the result encourages > > modular thinking. > > Wait.. I think I misunderstood in my previous reply. Are you saying that if > include c defines a function for export and myprog.ex includes c directly that > it *shoulnd't* be able to access it? That that is bad modular programming? No. My scenario only had fileA include fileC, etc. Which is if I now understand correctly means that myprog can not call c:hello() If myprog directly included fileC then I would expect it to be able to call c:hello() as easily as a:hello() and b:hello() Regarding modularity, I guess this could be considered a practical solution. My intuition tells me there is more to this issue however. I'll have to give it some more thought.