Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33766 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68608 invoked by uid 1010); 5 Dec 2007 20:11:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68580 invoked from network); 5 Dec 2007 20:11:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Dec 2007 20:11:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=nlgordon@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nlgordon@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.191 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: nlgordon@gmail.com X-Host-Fingerprint: 209.85.198.191 rv-out-0910.google.com Received: from [209.85.198.191] ([209.85.198.191:55498] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 75/54-20707-DC507574 for ; Wed, 05 Dec 2007 15:11:03 -0500 Received: by rv-out-0910.google.com with SMTP id k15so4019465rvb for ; Wed, 05 Dec 2007 12:10:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=khXzcXAY0fymwB3T4AQn+ViIfonoorNNpLIme5OAftw=; b=c/YIPDx87oRCdL00RdsyDRQBHfw5xug/eF48tilFKpN4GBCdLYlOCxR60A0IeM2z0HI677QPjuF6eyIOLCNzvSEje1k5+QtVPTB03Vm+iG2fJLKc2KbwBQpW9GKZ4QSZwdlxqC1y5SehMoGbcCphUt7EeBfidzXeb6TVuTYIAFM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=EYsBsc7VDPhHMageMV3s+yB3qqLmFgTSR4qRyVDwrwv0mnxOL7ltbnMJJBU8UShLpGGJPjmkomNhD9yCRYdko3Rxn6fN2F2XRpMk6da0i9KZMTaa4VxENjf6nNheI/vboHsy0KIPKciDkvOw3U8JEemRGsRlP2886YN3Gmxz0wU= Received: by 10.141.123.4 with SMTP id a4mr1465128rvn.1196885439542; Wed, 05 Dec 2007 12:10:39 -0800 (PST) Received: by 10.140.225.6 with HTTP; Wed, 5 Dec 2007 12:10:39 -0800 (PST) Message-ID: Date: Wed, 5 Dec 2007 14:10:39 -0600 To: "Stanislav Malyshev" Cc: internals@lists.php.net In-Reply-To: <4756E849.9050904@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200712042226.08192.larry@garfieldtech.com> <1196829384.14915.6.camel@blobule> <4756E11B.8030302@zend.com> <1196876641.14915.40.camel@blobule> <4756E849.9050904@zend.com> Subject: Re: [PHP-DEV] RFC: Dropping Namespace From: nlgordon@gmail.com ("Nate Gordon") On Dec 5, 2007 12:04 PM, Stanislav Malyshev wrote: > > collision problems that class naming and function naming have. Only > > 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. 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. This paves the way for doing much more advanced things with packages and run-time loading of code (which I know some people will think isn't good). Of all the namespace talk I've heard, the only part I disagree with is: use Foo::Bar as OtherBar; This seems like a maintainability nightmare to me as well as having well having some possible BC issues long-term. If you don't like someone's class name that much that you have to alias it then just make your own wrapper class: class OtherBar extends Foo::Bar {} Its not like it is that many more characters to write. So if we have to wait until PHP 6 to get this right, then so be it. I just see this as being critical to the future of enterprise/large scale PHP and don't want to see it die. -- -Nathan Gordon If the database server goes down and there is no code to hear it, does it really go down? :wq