Re: namespace separator and whining
| From: | Rodrigo Saboya | Date: | Mon, 27 Oct 2008 16:46:39 +0000 |
| Subject: | Re: namespace separator and whining | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-41466@lists.php.net to get a copy of this message | ||
Stanislav Malyshev wrote:
Hi!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 SaboyaThat'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.1) check for namespaced\classname 2) try to autoload namespaced\classname 3) check for internal classname