Re: my last attempt at sanity with namespaces

From: Date: Thu, 16 Oct 2008 22:11:17 +0000
Subject: Re: my last attempt at sanity with namespaces
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-41170@lists.php.net to get a copy of this message
Hi!
It does not allow calling both with the same import name, but it does allow: <?php namespace blah; include 'thing1.php'; include 'thing2.php'; use class ::foo; use namespace ::foo as another; foo::blah(); // static method another::blah(); // namespace function ?>
It's basically the same that my proposal does, only you have to work twice as hard (two use's) and remember which name you assigned to what - and you still would have to rewrite the code to use another:: - so you have to both add use's _and_ rewrite the actual call code. And you'd have to do it even if names in class foo have nothing to do with names in namespace foo. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com

« previous php.internals (#41170) next »