Autoload would work exactly the same with namespaces, just do a str_replace and replace "::" with "_".
On Wed, 2007-12-05 at 09:52 +0100, Robert Lemke wrote: > Hi Derick, > > I also agree with your arguments - beautifying class names is not > reason enough for > introducing namespaces. > > On 04.12.2007 at 23:16 Derick Rethans wrote: > > > 4. What is wrong with simple prefixes in the first place? Both PEAR_*, > > Zend_*, ezc*, and ezp* are perfectly acceptable markers for > > different > > 'namespaces'. We could optionally create a registry on php.net for > > this to avoid conflicts. > > > While experimenting with namespaces to use with the next major version > of > TYPO3, I realized that always using a full class name such as > > "T3_MyPackage_MySubPackage_Controller_DefaultController" > > has many advantages. Autoloading becomes a lot easier and if the > filename > equals the class name (ie. the full name, not only > "DefaultController.php") > you are never in doubt where a file belongs to or comes from. > > Therefore we in the TYPO3 project currently tend to not using namespaces > even if PHP6 had support for them. > > robert -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php