Re: Getting a list of registered namespaces.

From: Date: Thu, 16 Jun 2011 17:48:16 +0000
Subject: Re: Getting a list of registered namespaces.
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-53340@lists.php.net to get a copy of this message
On 16 June 2011 17:40, Stas Malyshev <smalyshev@sugarcrm.com> wrote: > Hi! > > On 6/16/11 8:37 AM, Richard Quadling wrote: >> >> Maybe, but because of a lack of convention on naming, we have namespaces. > > No, we have namespaces not because we couldn't agree on naming convention, > but because any naming convention without namespaces would lead to ugly code > (which you call "sensible long names" but which rapidly stop being sensible > if you actually try to do it). I was joking. > >> So it would seem appropriate to have the ability to investigate a >> namespace to see what it contains and/or if it exists. >> >> Why? For exactly the same reasons you have class_exists(), >> interface_exists(), function_exists(). > > Classes and functions actually exist as objects in the engine. Namespaces do > not. They are just parts of names. You can not instantiate a namespace, you > can not call a namespace. So these reasons do not apply. And now I understand. Thanks for that. -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea

« previous php.internals (#53340) next »