Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31223 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99735 invoked by uid 1010); 23 Jul 2007 18:40:25 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 99720 invoked from network); 23 Jul 2007 18:40:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2007 18:40:25 -0000 Authentication-Results: pb1.pair.com header.from=markus@fischer.name; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=markus@fischer.name; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fischer.name from 213.46.255.22 cause and error) X-PHP-List-Original-Sender: markus@fischer.name X-Host-Fingerprint: 213.46.255.22 viefep18-int.chello.at Solaris 10 (beta) Received: from [213.46.255.22] ([213.46.255.22:14627] helo=viefep34-int.chello.at) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/2F-27148-716F4A64 for ; Mon, 23 Jul 2007 14:40:25 -0400 Received: from genuine.home ([213.47.89.232]) by viefep34-int.chello.at (InterMail vM.7.08.02.00 201-2186-121-20061213) with ESMTP id <20070723184020.UBBW10677.viefep34-int.chello.at@genuine.home>; Mon, 23 Jul 2007 20:40:20 +0200 Received: from chello213047089232.17.14.vie.surfer.at ([213.47.89.232] helo=[192.168.1.51]) by genuine.home with esmtpa (Exim 4.50) id 1ID2k3-00074u-Nu; Mon, 23 Jul 2007 20:34:49 +0200 Message-ID: <46A4F613.6020807@fischer.name> Date: Mon, 23 Jul 2007 20:40:19 +0200 User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: Andrew Minerd CC: Stanislav Malyshev , 'PHP Internals' References: <46A31D95.2080407@fischer.name> <46A4661A.6080202@zend.com> <200707231140.55535.pstradomski@gmail.com> <46A4BA4F.6090506@dealnews.com> <40CA6572-030F-43E2-8706-64D1167C527C@bitxtender.com> <46A4C090.50402@php.net> <3d1a63d10707230942y2b2504d1p5f995f01d28a622b@mail.gmail.com> <46A4DF33.1030403@zend.com> <20070723110303.0c033048@h4x0r.tss> <46A4EEBA.7040308@zend.com> <20070723112810.0428efdd@h4x0r.tss> In-Reply-To: <20070723112810.0428efdd@h4x0r.tss> X-Enigmail-Version: 0.95.2 OpenPGP: id=C2272BD0; url=http://markus.fischer.name/my_public_key.txt Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -37 X-Spam-Level: --- X-Spam-Report: Spam detection software, running on the system "genuine.home", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Andrew, Andrew Minerd wrote: > Well, first of all, not exactly. I think you meant: not import everything from two or more namespaces with conflicting names. Secondly, that's not the only solution. You could import everything from one, and not import from the other (or use a shorter prefix). Thirdly, you're not preventing collisions _at all_: > > import Zend::DB; > import My::DB; > import Woot::Database as DB; [...] Content analysis details: (-3.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -3.3 ALL_TRUSTED Did not pass through any untrusted hosts -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 2.0 RCVD_IN_SORBS_DUL RBL: SORBS: sent directly from dynamic IP address [213.47.89.232 listed in dnsbl.sorbs.net] 0.1 RCVD_IN_NJABL_DUL RBL: NJABL: dialup sender did non-local SMTP [213.47.89.232 listed in combined.njabl.org] -0.0 AWL AWL: From: address is in the auto white-list Subject: Re: [PHP-DEV] Question about Namespace patch From: markus@fischer.name (Markus Fischer) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Andrew, Andrew Minerd wrote: > Well, first of all, not exactly. I think you meant: not import everything from two or more namespaces with conflicting names. Secondly, that's not the only solution. You could import everything from one, and not import from the other (or use a shorter prefix). Thirdly, you're not preventing collisions _at all_: > > import Zend::DB; > import My::DB; > import Woot::Database as DB; I don't quite understand your example. When I look at it in real life, I would go for: import Zend::DB as ZBD; import My::DB as MDB; import Woot::Database as DB; I mean, that's is the point, to have more readable code == shorter identifiers, isn't it? So your code continues to read (just made up): $oZdb = ZDB::factor('mysql'); $oMdb = MDB::getInstance('oracle'); $oWdb = DB::getDriver('postgres'); instead of: $oZdb = Zend::DB:factor... $oMdb = My::DB::getInstance $oWdb = Woot::Database::getDriver.. Isn't that a win, at last? That's how I understood. Maybe I got that wrong. - - Markus -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGpPYT1nS0RcInK9ARAmQmAKDGsYj/ZY0FNojQobKb3bK2NL6QDgCcDKgl LnyIP65ymnx180f7/WD5WfM= =LjpG -----END PGP SIGNATURE-----