Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41698 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 11929 invoked from network); 5 Nov 2008 22:29:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2008 22:29:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:45202] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/39-22938-54E12194 for ; Wed, 05 Nov 2008 17:29:25 -0500 Received: from [83.228.56.37] (port=4498 helo=pc) by host.fmethod.com with esmtpa (Exim 4.69) (envelope-from ) id 1KxqsL-00066J-T1 for internals@lists.php.net; Wed, 05 Nov 2008 16:29:22 -0600 Message-ID: <727EE7FF35BC46C18467A632307E020C@pc> To: References: <29.7A.15458.C4880194@pb1.pair.com> <5C.FA.15458.9A980194@pb1.pair.com> Date: Thu, 6 Nov 2008 00:29:15 +0200 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="ISO-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] Re: Namespace Resolution From: sv_forums@fmethod.com ("Stan Vassilev | FM") >Here is a reason why we would limit this to international functions only: >- <@Stas> but note that global user-space fallback for function means >run-time resolution (which may be ok, but slower - no caching resolution >in bytecode cache) Hi, Not true: you can't resolve it at compile time with internal-only functions, since you still don't know what *namespaced user functions* will be loaded at runtime with overlapping names. I.e. : ----FILE aaa.php---- namespace Foo; function strpos() {} ----FILE bbb.php---- namespace Foo; if (runtime condition) include 'aaa.php'; strpos(); // parse-time resolution will ignore the loaded Foo\strpos() and resolve to internal anyway. So, no performance benefit whatsoever, any fallback requires *runtime* resolution. Furthermore, don't you guys see that coding IDE-s will have issues with code hinting those functions. Is it the namespaced function or the global one? The IDE can't know, an IDE can't resolve vague runtime conditional includes. Eclipse PDT works great right now, with autoload and all, since it a given functionc/class identifier can be either internal, or in the project, and each has a unique name. With the magical fallbacks, all this goes to hell. Regards, Stan Vassilev