Re: RFC: Dropping Namespace
| From: | Ronald Chmara | Date: | Wed, 05 Dec 2007 10:08:05 +0000 |
| Subject: | Re: RFC: Dropping Namespace | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33726@lists.php.net to get a copy of this message | ||
On Dec 5, 2007, at 12:52 AM, 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:Wow, total Deja Vu. http://www.phpbuilder.com/lists/php-documentation-list/2001071/0109.php I, for one, would not enjoy typing out: "T3_MyPackage_MySubPackage_Controller_DefaultController" any more often than I absolutely *had* to. And in a somewhat amusing sense, the "register_global" vs. "local variable" debates aren't that far off from "register_class_as_global" vs. "local class namespace" debates.... Maybe we could all just re-read the email archives from back then, and save ourselves a lot of arguing? :) -Bop4. 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.