Re: Do you currently use namespaces?

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

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?

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.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu