RE: [PHP-DEV] Simple Namespace Proposal
| From: | Dmitry Stogov | Date: | Mon, 09 Jul 2007 16:33:50 +0000 |
| Subject: | RE: [PHP-DEV] Simple Namespace Proposal | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-30682@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Stefan Priebsch [mailto:stefan.priebsch@e-novative.de]
> Sent: Monday, July 09, 2007 6:17 PM
> To: Dmitry Stogov
> Cc: 'Sebastian Bergmann'; internals@lists.php.net
> Subject: Re: [PHP-DEV] Simple Namespace Proposal
>
>
> Dmitry,
>
> >>> Note that multiple files in namespace won't allow autoloading.
> >> Can you please explain why that is so?
> >
> > Now autoloading maps class name into file name, however if you have
> > several classes in one file, only one of them may be
> autoloaded(). The
> > same with namespaces.
>
> Did you confuse "multiple files in namespace" and "multiple
> namespaces in a file" in your original post?
Yes :)
Dmitry.
> If yes, I'm with
> you, otherwise: Wasn't the original idea of your namespace
> implementation to simplify those long PEARified class names,
> kind of, by substituting a namespace for that name prefix? So
> I can write an autoloader that maps a
> namespace+class name to a file name.
>
> Kind regards,
>
> Stefan
>
>
> --
> >e-novative> - We make IT work for you.
>
> e-novative GmbH - HR: Amtsgericht München HRB 139407
> Sitz: Wolfratshausen - GF: Dipl. Inform. Stefan Priebsch
>
> http://www.e-novative.de
>