Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33699 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72731 invoked by uid 1010); 4 Dec 2007 23:36:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 72716 invoked from network); 4 Dec 2007 23:36:49 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Dec 2007 23:36:49 -0000 Authentication-Results: pb1.pair.com smtp.mail=greg@chiaraquartet.net; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=greg@chiaraquartet.net; sender-id=unknown Received-SPF: error (pb1.pair.com: domain chiaraquartet.net from 38.99.98.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 38.99.98.18 beast.bluga.net Linux 2.6 Received: from [38.99.98.18] ([38.99.98.18:58084] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C1/B2-47601-194E5574 for ; Tue, 04 Dec 2007 18:36:49 -0500 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 989BDC0DEB4; Tue, 4 Dec 2007 16:36:46 -0700 (MST) Received: from [192.168.0.106] (CPE-76-84-15-179.neb.res.rr.com [76.84.15.179]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id 2928DC0DEA9; Tue, 4 Dec 2007 16:36:46 -0700 (MST) Message-ID: <4755E492.2080906@chiaraquartet.net> Date: Tue, 04 Dec 2007 17:36:50 -0600 User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: Derick Rethans CC: PHP Developers Mailing List References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: RFC: Dropping Namespace From: greg@chiaraquartet.net (Gregory Beaver) Derick Rethans wrote: > With all the above considerations, especially my first point, I still have not > heard any good reason why namespaces in the current implementation are actually > useful - or what particular case they solve... so I am wondering, are they > really useful? I come now to the conclusion that they are not, and for myself > (and most likely my work projects) I would have to decide not to go with > namespaces, but instead stick with the 3 letter prefixing. Something that I > have totally no problem with, as it is nice and easy. I have to agree with all points except for the usefulness of "use" - the ability to re-alias classes is very nice. Incidentally, one argument - that you can't alias internal classes - is incorrect. Try this script: However, in the global scope (no namespace) it would fail. This is a bug that is easily fixed. use should allow re-aliasing of global classes, and I could provide a very easy fix. What if we simply kept the ability to alias classes via "use"? The best feature of the current namespace implementation is the ability to rename classes in a script. This way, you could use conflicting class names, as in this example: file1.php: file2.php: All the benefits of namespaces with none of the brackets or no brackets debate. Greg