You are here: Re: Why there's no namespace keyword in php5? « PHP Programming Language « IT news, forums, messages
Re: Why there's no namespace keyword in php5?

Posted by Weird-beard on 10/18/05 11:48

another benefit of being able to use namespaces is providing another
layer of encapsulation, defining visibility for classes, hiding
unneeded info from the namespaces different than the current.

I think that's more important than the name collision. About the
naming,using frameworks or 3rd party modules etc. results in name
collisions most of the time, and working as a team may result in weird
names.
Eg. Namespace A
{
private class B
{}
public Class c
}
Namespace D
{
private class E
{
instC=new C(); // OK
instB=new B(); // Not Accessible
}
}

 

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

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