RE: [PHP-DEV] Simple Namespace Proposal

From: Date: Mon, 09 Jul 2007 06:39:14 +0000
Subject: RE: [PHP-DEV] Simple Namespace Proposal
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-30638@lists.php.net to get a copy of this message
> -----Original Message----- > From: Stefan Priebsch [mailto:stefan.priebsch@e-novative.de] > Sent: Sunday, July 08, 2007 3:51 PM > To: Dmitry Stogov > Cc: 'Sebastian Bergmann'; internals@lists.php.net > Subject: Re: [PHP-DEV] Simple Namespace Proposal > > > Hi Dmitry, > > I am merging together your various posts: > > > 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. Dmitry. > > > function namespace_name($name) { > > return __NAMESPACE__ . "::" . $name; > >} > Thanks for posting this - I am not sure wether this would do > the trick in my case, though, since would need to calculate a > fully-qualified name from *outside* the current namespace. BUT: > > > > Putting multiple namespaces in one file is really unusual > case. It may > > be implemented, but I don't like to do it, because it may give more > > mess then advantage. > Right. As I said before, I'd like to have this if it is not > difficult to do. Given the recent discussion with Rasmus > about caching I think that y original idea of glueing > together files to improve performance will go down the drain > anyway. Bottom line: I'm with you. > > > 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 >

« previous php.internals (#30638) next »