Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40421 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 25408 invoked from network); 10 Sep 2008 01:21:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2008 01:21:32 -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 212.25.124.163 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.163 il-gw1.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.163] ([212.25.124.163:30643] helo=il-gw1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C5/9F-23799-A1127C84 for ; Tue, 09 Sep 2008 21:21:31 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by il-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 10 Sep 2008 04:22:40 +0300 Received: from [192.168.16.110] ([192.168.16.110]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 9 Sep 2008 18:22:37 -0700 Message-ID: <48C7215D.1070806@zend.com> Date: Tue, 09 Sep 2008 18:22:37 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: Elizabeth M Smith , 'PHP Internals' References: <486FA5FB.1000300@php.net> <48C55855.4080602@zend.com> <48C5624A.1040901@zend.com> <48C56743.2060706@zend.com> <48C56821.2040805@shitennou.com> <48C5695E.1010404@zend.com> <48C56A51.1000307@shitennou.com> <48C56CEE.6050807@zend.com> <48C56DED.4010407@shitennou.com> <48C57045.6020003@zend.com> <48C5715C.2070102@shitennou.com> <48C574E8.1030504@zend.com> <48C57761.5030708@shitennou.com> <48C57F58.3060703@zend.com> <48C59A7D.50201@shitennou.com> <48C5A0B9.2040300@zend.com> <48C5A90E.6060902@shitennou.com> <48C5ABC4.1010008@zend.com> <48C5B010.8040301@shitennou.com> <48C5B81F.4000504@zend.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 10 Sep 2008 01:22:37.0003 (UTC) FILETIME=[B59421B0:01C912E3] Subject: Re: [PHP-DEV] Re: towards a 5.3 release From: stas@zend.com (Stanislav Malyshev) Hi! > I disagree. The idea is that I get control over how I manage to global > namespace. As such its sensible that I want to use "mysql" in my code > instead of DB::mysql. You may use it. You just won't get wildcard imports, because that doesn't work conceptually. > Also when it comes to resolution, inclusion order should not matter, > period. if it does we have a serious flaw in our design. if we cannot We already have this serious flaw in our design. If we use "new Foo()", and it's definition not included, it resolves differently (namely, to fatal error) than if we had included the definition. Also, with inheritance, if you include or define inherited classes in wrong order - i.e. child before parent - you may get problem too. You'd say this can be changed by autoloading, moving classes around, etc. - but behavior you complain about can be changed easily too, you just insist there would be no possible case, however hard you try to make a mistake, to get different resolution. > make a performant solution in this case, we better have nothing. that I don't see how it's better to have nothing at all than a solution that works in 99% of cases - unless you try on purpose to write code that doesn't work. I also find it very strange that you and other people are so insistent on having no namespace solution at all. How that would help you? How that would make PHP better? > if some core developers have extensive experience with namespaces in > Java and packages in other languages, these people have done more with > this construct in PHP than many of us have. Also while I do not know all You seem to suppose neither me nor people I talked with didn't try to do things with namespaces in PHP. This is not correct. > that they are solid developers. So I think you are brushing their > expectations off too lightly here. By "brushing too lightly" you mean "spending three days in discussion, explaining repeatedly point by point each decision and each tiny point of each argument, in full detail", right? > I am not a friend of smarty, but for one most template engines work very > hard to keep the number of chars to a minimum in order to not "pollute" > their markup with too much PHP code (just think of the The fact that people expect that they can call a function from a > namespace in a way that looks different from a static method call > however is imho clearly something that needs to be addressed. One way I don't see why they have to insist on that. I think it's just misconception, making artificial differences where they do not exist. > I am not convinced that you have demonstrated the mentioned used cases > are really so clearly "the wrong way" that they should not be supported. What could convince you that something is a wrong way, theoretically? I showed that it has hight WTF factor, can lead to potential bugs, and does not add anything to functionality. So far strongest argument for them I got is "I don't want :: in names". For me, "don't want :: in names" versus "buggy unmaintainable code" is clearly wrong way. But some think otherwise, that's their right. > I think that PHP is not an OO language and as such there is no reason to Namespaces is an OO feature, however. It is only natural that if you don't want to touch OO, you get no namespaces. PHP has tons of features that make sense only if you use OO, that's one more of them. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com