Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:26490 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35266 invoked by uid 1010); 10 Nov 2006 21:46:47 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35241 invoked from network); 10 Nov 2006 21:46:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2006 21:46:47 -0000 Authentication-Results: pb1.pair.com smtp.mail=php-php-dev@m.gmane.org; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=news@sea.gmane.org; sender-id=pass Received-SPF: pass (pb1.pair.com: domain m.gmane.org designates 80.91.229.2 as permitted sender) X-PHP-List-Original-Sender: php-php-dev@m.gmane.org X-Host-Fingerprint: 80.91.229.2 main.gmane.org Linux 2.5 (sometimes 2.4) (4) Received: from [80.91.229.2] ([80.91.229.2:44224] helo=ciao.gmane.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 56/2E-27611-343F4554 for ; Fri, 10 Nov 2006 16:46:45 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GieCs-0003bz-BD for internals@lists.php.net; Fri, 10 Nov 2006 22:46:38 +0100 Received: from bi01p1.nc.us.ibm.com ([129.33.49.251]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Nov 2006 22:46:38 +0100 Received: from pmuellr by bi01p1.nc.us.ibm.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Nov 2006 22:46:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: internals@lists.php.net Date: Fri, 10 Nov 2006 16:46:20 -0500 Lines: 22 Message-ID: References: <4554AE0D.4080600@caedmon.net> <4554B9B5.5090305@caedmon.net> <20061110182358.GB20309@bantha> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: bi01p1.nc.us.ibm.com User-Agent: Thunderbird 1.5.0.8 (Macintosh/20061025) In-Reply-To: <20061110182358.GB20309@bantha> Sender: news Subject: Re: [PHP-DEV] Namespaces in PHP 6 - ++$take From: pmuellr@yahoo.com (Patrick Mueller) Daniel T. Gorski wrote: > Escpecially due to the new OO features of PHP 5, namespaces are urgently > required for writers of independent libraries which should not clash. I would claim exactly the opposite. That's because you already get scoping on names, for free, when you use objects. The method and field names. Of course, for static methods and fields you'll need to reference the class name again ... so don't do that :-) There would typically be a one time 'hit' in your code for a long, prefixed named used as a constructor, or possibly a static method called on a factory. After that, if you're dealing with object instances, then instead of function names (which would need to also use a longish prefix, because they are scoped globally), you can use plain old short method names. -- Patrick_Mueller@us.ibm.com IBM PHP Community Architect, IBM Research Triangle Park