Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41466 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64690 invoked from network); 27 Oct 2008 16:46:48 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Oct 2008 16:46:48 -0000 X-Host-Fingerprint: 200.142.121.42 unknown Received: from [200.142.121.42] ([200.142.121.42:24464] helo=localhost.localdomain) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/52-34199-670F5094 for ; Mon, 27 Oct 2008 11:46:47 -0500 Message-ID: To: internals@lists.php.net Date: Mon, 27 Oct 2008 14:46:39 -0200 User-Agent: Thunderbird 2.0.0.17 (X11/20080914) MIME-Version: 1.0 References: <49048EC1.9060908@chiaraquartet.net> <4904CE3B.2000001@chiaraquartet.net> <4905EDA9.9050301@zend.com> In-Reply-To: <4905EDA9.9050301@zend.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 200.142.121.42 Subject: Re: [PHP-DEV] namespace separator and whining From: rodrigo.saboya@bolsademulher.com (Rodrigo Saboya) Stanislav Malyshev wrote: > Hi! > >>> 1) check for namespaced\classname >>> 2) try to autoload namespaced\classname >>> 3) check for internal classname > > That's the wrong way to do it - it means every time you mention the > internal class name without prefixing it with \ you get exhaustive > autoloading search and nothing tells you about it but sudden performance > drop in your application. I agree with Stas. It's better to force people to actually reference their classes/functions/constants correctly and get better performance than getting unclear slowdowns. On a side note, congratulations for identifying and addressing the issues with namespaces before the release. Changing the separator was a hard but wise decision. There's no perfect choice but it was best of all IMO. -- Rodrigo Saboya