Re: Do you currently use namespaces?

new topic     » goto parent     » topic index » view thread      » older message » newer message

ken mortenson wrote:
> 
> Jeremy Cowgar wrote:
>  
> > -- filea.e
> > global procedure hello()
>  
> > -- fileb.e
> > include filea.e as a
> > global procedure hello()
>  
> > -- myprog.ex
> > include fileb.e as b
> > b:hello() -- prints "fileb: hello"
> > 
> > myprog.ex cannot access a:hello() in any way. It would have to directly
> > include
> > filea.e to access filea.e's hello()
> 
> Amazing, you figured out what I was trying to say even when I couldn't!!!
> 
> Let me look at this...
> 
> 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?
> 

No, that's incorrect. if myprog.ex never includes directly c, or d then myprog
could not call c:hello() nor d:hello().

> 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.

Yes, but we need to fully understand the problems, if just perceived. Please
keep this thread going. I know it's getting a bit long, but it's good discussion.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu