You are here: Re: Namaspaces, caling functions and classes defined in the global name space « PHP Programming Language « IT news, forums, messages
Re: Namaspaces, caling functions and classes defined in the global name space

Posted by Toby A Inkster on 11/30/07 14:59

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/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация