Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31220 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89204 invoked by uid 1010); 23 Jul 2007 18:09:09 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89189 invoked from network); 23 Jul 2007 18:09:09 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2007 18:09:09 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.114 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.114 unknown Windows 2000 SP4, XP SP1 Received: from [63.205.162.114] ([63.205.162.114:51166] helo=us-ex1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 08/ED-27148-3CEE4A64 for ; Mon, 23 Jul 2007 14:09:08 -0400 Received: from [127.0.0.1] ([192.168.16.180]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Mon, 23 Jul 2007 11:09:04 -0700 Message-ID: <46A4EEBA.7040308@zend.com> Date: Mon, 23 Jul 2007 11:08:58 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Andrew Minerd CC: 'PHP Internals' References: <46A31D95.2080407@fischer.name> <46A4661A.6080202@zend.com> <200707231140.55535.pstradomski@gmail.com> <46A4BA4F.6090506@dealnews.com> <40CA6572-030F-43E2-8706-64D1167C527C@bitxtender.com> <46A4C090.50402@php.net> <3d1a63d10707230942y2b2504d1p5f995f01d28a622b@mail.gmail.com> <46A4DF33.1030403@zend.com> <20070723110303.0c033048@h4x0r.tss> In-Reply-To: <20070723110303.0c033048@h4x0r.tss> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 23 Jul 2007 18:09:04.0772 (UTC) FILETIME=[8E102C40:01C7CD54] Subject: Re: [PHP-DEV] Question about Namespace patch From: stas@zend.com (Stanislav Malyshev) > it is up to the _application_ to solve conflicts (i.e., not import > everything from both namespaces). Currently, an application can't do Exactly - not import everything from namespaces. That's what we are doing :) > anything about name conflicts in libraries short of editing the > source; namespaces (assuming the libraries adopt them) give the Actually, they can and they do - they use long names which have high chance to be unique. This works, but this is extremely ugly and inconvenient to work with. > If there are technical reasons (i.e., compile-time name resolution, > as you mentioned in passing), I think it'd be beneficial to see a > discussion of those. Compile-time resolution means you don't get performance penalty for namespaces when you are not using it, and have very low costs when you do use it. Allowing blanket imports means we don't know what "new Foo()" means until it is executed - meaning we need to make extra lookups on each class fetch, even if the code doesn't use namespaces at all. That's only one problem with blanket imports. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com