On Thu, Jun 16, 2011 at 7:48 PM, Richard Quadling <rquadl...@gmail.com>wrote:
> On 16 June 2011 17:40, Stas Malyshev <smalys...@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. > > Okay, so namespaces doesn't exists for the engine, because they are added to the classnames in compile-time, but we could add some --rX argument for the php binary, which would iterate over the classes and functions and so for a given extension, and fetch and list the introduced namespaces. what do you think? Tyrael