Re: Do you currently use namespaces?

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

Jeremy Cowgar wrote:
> We currently have the ability for a file to declare it's namespace, what do
> you think about building from it:
> 
> I have no idea if friend is a good word or not, but it's not global and not
> local. It says you can share this item with other files in the same namespace.

To recap, in v3 a namespace is a local symbol. That is, the namespace name
itself is only visible in the file that declares it, and that name lives in the
file's scope so namespace name in a file must be unique.

This means that ...

  include foo.e as foo
  include bar.e as foo

would fail.


Jeremy,
if I read you correctly, you are suggesting that in v4 we expand the namespace
concept to become more like a package, such that all files with the same
namespace name form a logical collection of modules, and that we should then be
able to nominate which symbols in a file can be seen at the 'package'/'namespace'
level but not outside that level. Ths would be a different scope from both
private (to the module/file) and global.

Have I got your thinking correct?

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

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

Search



Quick Links

User menu

Not signed in.

Misc Menu