Re: [PATCH] Re: [PHP-DEV] namespace examples (solving name resolution order issues)

From: Date: Tue, 09 Sep 2008 17:25:14 +0000
Subject: Re: [PATCH] Re: [PHP-DEV] namespace examples (solving name resolution order issues)
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-40417@lists.php.net to get a copy of this message
Stanislav Malyshev wrote: > Hi! > >> a use statement. For those who aren't clear on what Stas is saying, >> here is the better example: >> >> <?php >> namespace PEAR2::Pyrus::PackageFile::v2Iterator; >> use namespace::File, namespace::FileAttribsFilter, >> namespace::FileContents; >> ?> > > No, actually that's not what I meant. You can do this too, but I meant > just use namespace::File. There's no law about using :: in the code, > really. Just write namespace::File, it's both short and clear. > >> Now for the good news. The reason it is so slow is that the autoload is >> called for every single invocation of the class name. With the patch at >> http://pear.php.net/~greg/resolution_fix.patch.txt this >> performance is > > What this patch does? > >> Now that the performance hit is minimal, can we agree to get along on >> this proposed change Stas? ;) It transforms the critical nature of the >> problem to a truly minor performance hit on internal class usage without >> use or ::. > > Please read my response to your previous email, I have described there > issues with your proposal and how to make it non-contradictory and > what else needs to be done. Stas, I did read your message and posted a response, it is you who needs to read my reply. "What this patch does?" is patent evidence that you did not. Please try again. Greg

« previous php.internals (#40417) next »