Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:41190 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62588 invoked from network); 17 Oct 2008 02:00:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Oct 2008 02:00:14 -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 208.83.222.18 cause and error) X-PHP-List-Original-Sender: greg@chiaraquartet.net X-Host-Fingerprint: 208.83.222.18 unknown Linux 2.6 Received: from [208.83.222.18] ([208.83.222.18:42328] helo=mail.bluga.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4B/D5-12818-DA1F7F84 for ; Thu, 16 Oct 2008 22:00:14 -0400 Received: from mail.bluga.net (localhost.localdomain [127.0.0.1]) by mail.bluga.net (Postfix) with ESMTP id 498BFC10931; Thu, 16 Oct 2008 19:00:04 -0700 (MST) Received: from [192.168.0.106] (unknown [76.84.4.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bluga.net (Postfix) with ESMTP id C73E5C1092F; Thu, 16 Oct 2008 19:00:03 -0700 (MST) Message-ID: <48F7F238.8040703@chiaraquartet.net> Date: Thu, 16 Oct 2008 21:02:32 -0500 User-Agent: Thunderbird 2.0.0.17 (X11/20080925) MIME-Version: 1.0 To: Stanislav Malyshev CC: Steph Fox , PHP Developers Mailing List References: <48F653FF.5010106@chiaraquartet.net> <48F75FA1.7020505@zend.com> <48F7AD03.1050009@chiaraquartet.net> <48F7BC05.7060005@zend.com> <001501c92fed$112609f0$3ffc1f3e@foxbox> <48F7D98E.1000003@zend.com> In-Reply-To: <48F7D98E.1000003@zend.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP Subject: Re: [PHP-DEV] my last attempt at sanity with namespaces From: greg@chiaraquartet.net (Gregory Beaver) Stanislav Malyshev wrote: > Hi! > >> Yes, but most times when there is conflict it will be between two >> sets of code. So importing someone else's namespace explicitly and >> giving it a new name is a good call IMHO. > > If you have two distinct sets of code, why you use same namespace for > both of them? Namespaces are specifically designed so you could have > different sets of code in different places. > >> nb Stas - I asked the same question about warnings, Greg updated his >> proposal since then to answer it. > > As it is now, every call to class::method() not accompanied with use > should produce E_WARNING. I do not think it is an acceptable situation > - this would make code migration a nightmare, since even if you never > use functions and never even have any chance for a conflict, you still > have to insert hundreds of imports into your code, just to shut up the > warnings. I don't think it is a good idea. Feature that you do not > need, can not disable and have to work around is called "bug". Hi Stas, This is not what is proposed. The E_WARNING is *only* on a name conflict. Please re-read or try the patch: http://pear.php.net/~greg/resolve_conflict.patch.txt Greg