Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41695 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 88178 invoked from network); 5 Nov 2008 20:44:37 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2008 20:44:37 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.116 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.116 us-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [63.205.162.116] ([63.205.162.116:7000] helo=us-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 25/54-22938-4B502194 for ; Wed, 05 Nov 2008 15:44:37 -0500 Received: from [192.168.16.110] ([192.168.16.110]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 5 Nov 2008 12:44:37 -0800 Message-ID: <491205B5.1060307@zend.com> Date: Wed, 05 Nov 2008 12:44:37 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: Marcus Boerger , Gregory Beaver , Christian Schneider , PHP Development References: <49048EC1.9060908@chiaraquartet.net> <490628DB.9060209@zend.com> <11c607a60810271422l68949427pe31786275b0b152c@mail.gmail.com> <08747094-6B50-4A0D-9057-DFD12108B6C6@caedmon.net> <94CCB864-179A-48DA-A89A-3859796A9257@pooteeweet.org> <49063A1D.7070804@zend.com> <4906405F.7090205@zend.com> <490747B2.2010201@zend.com> <4D9A8597-EFE6-418A-B7F6-EAD9ED2361A5@pooteeweet.org> <7FA6946B-57B9-4BC0-B2F1-AFD47572F363@pooteeweet.org> <491071EC.7020501@cschneid.com> <49107527.7060604@chiaraquartet.net> <1652368155.20081105001225@marcus-boerger.de> <6246E5E0-BD11-48E2-B32B-DA7F82E605E2@pooteeweet.org> <885621138.20081105004925@marcus-boerger.de> <4910E33C.2070609@zend.com> <02297291-ADDF-4AA1-897C-607B93980A32@pooteeweet.org> <491200FE.1000504@zend.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Nov 2008 20:44:37.0434 (UTC) FILETIME=[5153A1A0:01C93F87] Subject: Re: [PHP-DEV] namespace separator and whining From: stas@zend.com (Stanislav Malyshev) Hi! > ok, they have the same non fully qualified named. That's why we should have unambiguous resolution mechanism. You propose to add one ambiguity on top of another. >> want to get generic \Exception instead of \My\Very\Specific\Exception >> - it would probably break all your error handling. > > this is about overloading and flexibility. We never had class name overloading and I don't see why we should start it. It's runkit domain, as I said. If you call certain class, you should be able to know which class is that. I don't understand why when seeing problem so big that it requires change of whole syntax in something like foo::bar() - you fail to understand ambiguity potential in your proposal. > the point was that this gives the end user the choice of when, if at > all, to fallback to the global namespace. in this way the default could > indeed be 1) ns 2) autoload 3) fail. just that autoload can now handle > more cases in a manner the end users might deem sensible. It's not autoload's task to change class names that it is loading. By the time you use autoloader the class name should already be known - otherwise you can't even decide if to use autoloader or not! And it definitely will screw up everything if you use multiple autoloaders with different ideas about how to rewrite class names. Please let's keep autoloaders simple and not insert there hacks that do not belong there, we have enough complexity there already. > i guess the other alternative (though actually i am not sure if its > possible), that people will likely try out is to extend the base class > inside the namespace on the fly. which i would consider much worse. What are you trying to achieve here? -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com