Re: Namaspaces, caling functions and classes defined in the global name space



taps128 wrote:

Yes but , as I've previously stated, readibilty is king. When you look
at ::A::foo();
your don't know what you are looking at exactly.

But prefixing it with GLOBAL doesn't help matters.

GLOBAL::A::foo();

Could be a function foo() in namespace GLOBAL::A or a class method
A::foo() in namespace GLOBAL.

And frankly, if you're "standing outside" A, it doesn't usually make any
difference whether it's a namespace or a class. Class methods can be
called just the same.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 5 days, 21:41.]

Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/11/28/itunes-sharing/
.



Relevant Pages

  • Re: Why do I "lose context" when I try to move certain operations to class methods?
    ... What namespace to I need to be importing (which ... >> that I want to build as a class method. ... >> 'Server' does not exist in the current context". ... >> public void GetPageAndSave ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: static variables in Python?
    ... namespace with variables that are not needed elsewhere. ... in Perl one can define a function foo like this ... In my address everything before the first period is backwards; ...
    (comp.lang.python)
  • Re: empty classes as c structs?
    ... Hmm, so if it doesn't find it in the current namespace, it looks in the parent? ... binding always happens in the innermost scope, so binding a name in a namespace ... from outer scopes, and later regain access to them using 'del'. ... Have a class method which allows a namespace to be 'put inside' another ...
    (comp.lang.python)
  • Re: empty classes as c structs?
    ... > Hmm, so if it doesn't find it in the current namespace, it looks in the parent? ... > binding always happens in the innermost scope, so binding a name in a namespace ... > Have a class method which allows a namespace to be 'put inside' another ... blog: http://rascunhosrotos.blogspot.com ...
    (comp.lang.python)
  • signing message element by id / no namespace
    ... wse 1.01, vs.net 2003 c# ... without prefixing the Id attribute with a namespace. ... a namespace referring to ws-utility, but I need to be able to sign the Id ... <DocumentSearch xmlns="http://www.ros.ie/schemas/inbox/ " /> ...
    (microsoft.public.dotnet.framework.webservices.enhancements)