Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92229 invoked by uid 1010); 5 Dec 2007 17:45:27 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 92214 invoked from network); 5 Dec 2007 17:45:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2007 17:45:26 -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 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:39258] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/18-20707-5B3E6574 for ; Wed, 05 Dec 2007 12:45:26 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 5 Dec 2007 19:45:23 +0200 Received: from [192.168.16.91] ([192.168.16.91]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 5 Dec 2007 09:45:19 -0800 Message-ID: <4756E3AF.2070703@zend.com> Date: Wed, 05 Dec 2007 09:45:19 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Derick Rethans CC: PHP Developers Mailing List References: <4755FB31.2050901@zend.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 Dec 2007 17:45:19.0786 (UTC) FILETIME=[9A78D0A0:01C83766] Subject: Re: [PHP-DEV] RFC: Dropping Namespace From: stas@zend.com (Stanislav Malyshev) > some people like a "misguided" implementation of namespaces. The idea of > namespaces is to prevent collisions in USER land code, not turning > internal PHP classes into a pile of goo. Yes, idea of namespaces is not to turn PHP classes into a pile of goo. But what's your point? > I don't quite understand why allowing multiple namespaces is such a big > issue, however - it won't solve the naming collision issue. I'm sorry, I don't understand what you mean by "multiple namespaces" - multiple namespaces per file? I object to allowing it for reasons having absolutely nothing to do with naming collisions, as anybody bothering to actually read what I wrote would immediately know. >> That's because namespaces are not executable blocks. > > Neither are classes. Your point being? > No, but, do you really need to have such long names? And besides that, Yes. Such names are hard fact of life, I have seen them in many applications and libraries, and I have heard developers to complain about it. > you *have* to keep repeating them in every file you'd want to use them - Once per file, yes. Much better than having to spell out all the long names every time. > Just saying "Yes, they are" is not a very good argument - actually, it's > not an argument at all. No more and no less than "I wonder if they are useful, let's just delete them". > Actually, it's exactly the opposite, as I avoid naming colissions > (point 1), I don't need to import every class I want to use (point 2), > and can group all my classes together in one file (point 3). Of course, if you don't want to hear about namespaces, nobody can force you. However, all of your points (avoiding naming collisions, not needing to import every class you want to use and ability to group classes together) is exactly how namespaces work right now. If you refuse to learn about it, it can't be helped, however that just means you deny yourself a very useful tool. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com