Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:31169 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69920 invoked by uid 1010); 23 Jul 2007 08:01:51 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 69905 invoked from network); 23 Jul 2007 08:01:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jul 2007 08:01:51 -0000 Authentication-Results: pb1.pair.com smtp.mail=jeremy@peak8solutions.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=jeremy@peak8solutions.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain peak8solutions.com from 69.50.1.43 cause and error) X-PHP-List-Original-Sender: jeremy@peak8solutions.com X-Host-Fingerprint: 69.50.1.43 unknown Received: from [69.50.1.43] ([69.50.1.43:9857] helo=peak8solutions.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A2/22-49395-D6064A64 for ; Mon, 23 Jul 2007 04:01:50 -0400 Content-class: urn:content-classes:message Date: Mon, 23 Jul 2007 02:01:39 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable In-Reply-To: <46A45B12.80402@zend.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PHP-DEV] Question about Namespace patch Thread-Index: AcfM/JAc401iTTdXQn+Ry+ZjaQloYAAABqgQ X-MimeOLE: Produced By Microsoft Exchange V6.5 References: <46A31D95.2080407@fischer.name> <46A42220.7010600@zend.com> <46A45B12.80402@zend.com> To: "Stanislav Malyshev" Cc: "Derick Rethans" , "Markus Fischer" , "internals" Subject: RE: [PHP-DEV] Question about Namespace patch From: jeremy@peak8solutions.com ("Jeremy Privett") Stanislav, Absolutely not the case. Take a look at C++, C#, even Python. The "namespaces" implementation of those languages is mostly consistent (even if Python doesn't call it that). You're not helping developers at all with this implementation. If you're working with a large library and have to import a lot of classes, the way this works is nothing but a pain. We would be better off not using namespaces at all, in this case. Thus, the problem has not been solved. Also, for the implementation to be complete, Core Developers and Extension Developers would need to namespace their classes / functions. And that, undoubtedly, is a LOT of work. I can understand this being the justification for implementing namespaces in the way it's been implemented, because all of this other stuff in the global namespace, but you still need to offer developers *some* way of importing everything out of a namespace. I absolutely will have upwards to close to 25 - 30 classes in a single namespace. And sometimes more. To be able to import them all is an absolute necessity for this implementation to be remotely feasible. Having an import block at the top of files that's that huge just doesn't make any sense. And that doesn't even consider the fact that I may be using OTHER libraries as well that may be namespaced. PEAR is a perfect example of this. Look at all the libraries that exist there. I would absolutely love to just: import PEAR; import PEAR::HTTP; import PEAR::Image; And not have to worry about going through and picking out every little individual class that I need. And with all of the languages I mentioned before, that is *exactly* how it works. Of course, we're back to the namespacing of the PHP Core and Extensions. Which is really the main blocker to any serious namespaces implementation, beyond what's currently patched to HEAD today, correct? I hope you can better see my viewpoint, now that I actually had the time to sit down and type out a more coherent reply. This implementation and the unicode.semantics discussion have to be the most frustrating points PHP6 has for me, right now. Thanks. --- Jeremy Privett Software Developer Peak8 Solutions -----Original Message----- From: Stanislav Malyshev [mailto:stas@zend.com]=20 Sent: Monday, July 23, 2007 1:39 AM To: Jeremy Privett Cc: Derick Rethans; Markus Fischer; internals Subject: Re: [PHP-DEV] Question about Namespace patch > And that's exactly why this implementation isn't intuitive. As far as I > can see from the way it's been explained, so far, that is not possible. No implementation is "intuitive", unless by "intuitive" you mean "works=20 as in that other language I know". Too bad in each of these languages it works differently :) --=20 Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com