Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33777 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1423 invoked by uid 1010); 5 Dec 2007 21:26:16 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 1407 invoked from network); 5 Dec 2007 21:26:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2007 21:26:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=steph@zend.com; spf=permerror; sender-id=softfail Authentication-Results: pb1.pair.com header.from=steph@zend.com; sender-id=softfail Received-SPF: error (pb1.pair.com: domain zend.com from 64.97.136.178 cause and error) X-PHP-List-Original-Sender: steph@zend.com X-Host-Fingerprint: 64.97.136.178 smtpout0178.sc1.he.tucows.com Solaris 8 (1) Received: from [64.97.136.178] ([64.97.136.178:29990] helo=n064.sc1.he.tucows.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 34/13-12052-57717574 for ; Wed, 05 Dec 2007 16:26:15 -0500 Received: from sc1-out03.emaildefenseservice.com (64.97.139.2) by n064.sc1.he.tucows.com (7.2.069.1) id 47030C3D005F2CAA; Wed, 5 Dec 2007 21:26:06 +0000 X-SpamScore: 2 X-Spamcatcher-Summary: 2,0,0,4459f2a0f70820d2,fb2fe948d55a8c3b,steph@zend.com,-,RULES_HIT:152:355:379:539:540:541:542:543:567:599:601:945:988:989:1155:1156:1260:1277:1311:1313:1314:1345:1437:1515:1516:1518:1534:1541:1587:1593:1594:1676:1711:1730:1747:1766:1792:2073:2075:2078:2198:2199:2377:2379:2393:2559:2562:2689:2693:2840:3027:3353:3622:3865:3866:3867:3868:3869:3870:3871:3872:3873:3874:4250:5007:6119:6261,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache: 0,MSF:not bulk,SPF:,MSBL:none,DNSBL:none X-Spamcatcher-Explanation: Received: from foxbox (unknown [64.97.206.40]) (Authenticated sender: steph.fox) by sc1-out03.emaildefenseservice.com (Postfix) with ESMTP; Wed, 5 Dec 2007 21:26:04 +0000 (UTC) Message-ID: <01f001c83785$870d4130$e6dfc350@foxbox> Reply-To: "Steph Fox" To: "Nate Gordon" , "Stanislav Malyshev" Cc: References: <200712042226.08192.larry@garfieldtech.com> <1196829384.14915.6.camel@blobule> <4756E11B.8030302@zend.com> <1196876641.14915.40.camel@blobule> <4756E849.9050904@zend.com> Date: Wed, 5 Dec 2007 21:26:30 -0000 Organization: Zend Technologies MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Subject: Re: [PHP-DEV] RFC: Dropping Namespace From: steph@zend.com ("Steph Fox") Hi Nate, >> Only if you insist on *not* using the namespaces to solve collision >> problems. For the 1001th time - you can not expect to put all names into >> global space and have the language by some magic to sort it out and go >> both ways. One name can mean only one thing, namespaces or not. >> Namespaces just allow you more convenient rules for defining what name >> means what thing. > > I would like to second this notion. There are those who would say > that the global namespace is for the use of PHP itself. I would > disagree heartily, PHP as a language is built to serve the developer > who is using it. They should decide what exists in the global > namespace. I'm firmly in the 'global namespace is for the use of PHP itself' camp. Why? Because it gives users the choice of totally ignoring namespace support if they don't want to use it, and because allowing user code to define classnames and functions in the global space via import/use (as opposed to by default) has a huge potential for difficult-to-debug misuse. If people want to be able to alias stuff they should be forced to namespace their code. > When I write a library I will often create functions/classes/variables > that have no business being used outside my library. So I don't see > the need to make the names longer just so I don't collide with someone > else's internal variables/classes/functions. Fine, so namespace it. - Steph