Re: Do you currently use namespaces?

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

Jeremy Cowgar wrote:
> 
> Derek Parnell wrote:
> > 
> > The D programming language has the addition concept of a package. I believe
> > that Java has too. A package is essentially a named collection of modules.
> > Anyhow,
> > the thing is you can declare a symbol has being exposed only to its module,
> > or only to its package, or to everything.
> > 
> > Maybe this can be used in Euphoria too somehow.
> > 
> 
> Derek,
> 
> We currently have the ability for a file to declare it's namespace, what do
> you think about building from it:
> 
> 
> }}}
<eucode>
> -- pack_a.e
> namespace pack
> 
> friend integer abc
> 
> -- pack_b.e
> namespace pack
> 
> include pack_a.e
> 
> ? abc
> </eucode>
{{{

> 
> 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.
> 
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>

"friend" is familiar for C++ coders;
I had suggested "internal" in my package package;
"protected" is used in other languages I think.

I don't know which looks best, but one is needed.

"private" has been suggested, but it collides with what we use to know as
private variables.

CChris

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

Search



Quick Links

User menu

Not signed in.

Misc Menu