Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26474 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53634 invoked by uid 1010); 10 Nov 2006 17:41:21 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53619 invoked from network); 10 Nov 2006 17:41:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 17:41:21 -0000 Authentication-Results: pb1.pair.com header.from=sean@caedmon.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=sean@caedmon.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain caedmon.net from 69.60.120.90 cause and error) X-PHP-List-Original-Sender: sean@caedmon.net X-Host-Fingerprint: 69.60.120.90 iconoclast.caedmon.net Linux 2.4/2.6 Received: from [69.60.120.90] ([69.60.120.90:44753] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/E2-27611-FB9B4554 for ; Fri, 10 Nov 2006 12:41:21 -0500 Received: from localhost ([127.0.0.1]) by iconoclast.caedmon.net with esmtp (Exim 3.35 #1 (Debian)) id 1GiaMM-0003Ly-00; Fri, 10 Nov 2006 12:40:11 -0500 Message-ID: <4554B9B5.5090305@caedmon.net> Date: Fri, 10 Nov 2006 12:41:09 -0500 User-Agent: Thunderbird 1.5.0.7 (X11/20060918) MIME-Version: 1.0 To: Ilia Alshanetsky CC: internals References: <4554AE0D.4080600@caedmon.net> In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Namespaces in PHP 6 - ++$take From: sean@caedmon.net (Sean Coates) > That's a bit of a circular logic no? There are indeed technical > challenges to implementing namespaces, these reasons have been covered > in previous discussions many times, since no adequate solution was > devised they were never implemented. Once those issues are resolved or > at the very least solutions are known, we can consider whether or not > this is something that's truly needed. I think we got hung up on political issues. The last discussion was not technical (other than "no, you can't use ! -- it's already an operator). I'd love to move onto discussing the technical hurdles, but I don't think we came to a political conclusion, yet. > I think this is a bogus argument. In order to benefit from namespaces > you need to use them, just like to benefit from containment through > prefixing you need to prefix functions/classes/etc... Namespaces are not > a magic bullet that will instantly make your problems go away and make > your code better. If anything it'll make code complex and intertwined, > introduce serious scope issue most people have not had to consider up > until now and so on. It will without a doubt increase language > complexity as well, which generally translates to a loss in performance. I don't think namespaces are a magic bullet. As it stands, it's impossible to use namespaces without a third party patch that may or may not work. I strongly believe that if namespaces are implemented in PHP 6, most of our prefixing/symbol collisions will go away as people migrate. It's much easier to track down a failed import than to comment out a function declaration in the PHP source. I also don't deny that there will be a minor performance hit. There are a ton of other things in PHP that reduce performance.. the idea is to find a balance of which ones are worth it (as we did with OOP and Unicode), and I believe that namespaces are worth it. I also know that I'm not alone in this. S