Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32278 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 58057 invoked by uid 1010); 12 Sep 2007 01:58:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 58035 invoked from network); 12 Sep 2007 01:58:45 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Sep 2007 01:58:45 -0000 Authentication-Results: pb1.pair.com header.from=david.coallier@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=david.coallier@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.185 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: david.coallier@gmail.com X-Host-Fingerprint: 209.85.198.185 rv-out-0910.google.com Received: from [209.85.198.185] ([209.85.198.185:12557] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C0/00-57702-3C747E64 for ; Tue, 11 Sep 2007 21:58:35 -0400 Received: by rv-out-0910.google.com with SMTP id k15so49475rvb for ; Tue, 11 Sep 2007 18:57:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; bh=2qz7JwLYnBHbNjHlUBrXIIEoonjeKfUdQ4XQicJOfJM=; b=GxQcvGOjNaZXBzs7fz6mm5FdMylhucloMBM8kwG+6YNwJrcfAcXHFcrDZxSRm7fxGpFaMv5vCERWj/b0gno45j1E0nN5bL2Yg2EbQal/9z2jEhMvpykyEvdOfaGPxCyVO7SkdkwybtbzGticW31aWXc+9KXaEFtsDIfnhXH8nZ8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=XLUe2pkaGhSqOCoD8ji3cWRS9hkczDStTqncD7HQC19BGD97n+lBY3Zd3v/vUyhW8EG6t3Jfpo4YXTx6E19/d/OWMxzXk1D330tzAir89XLcoTbmPolFXZRAUhnE85/EI1y/vZtVjR5XlXzdHBUbx6zA+g9jIlNMzvHAwoeyvoc= Received: by 10.141.19.16 with SMTP id w16mr9239rvi.1189561868885; Tue, 11 Sep 2007 18:51:08 -0700 (PDT) Received: by 10.140.127.15 with HTTP; Tue, 11 Sep 2007 18:51:08 -0700 (PDT) Message-ID: Date: Tue, 11 Sep 2007 21:51:08 -0400 Sender: david.coallier@gmail.com To: "Larry Garfield" Cc: "PHP Internals" In-Reply-To: <200709112040.10581.larry@garfieldtech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46E5D163.4050800@zend.com> <1869442285.20070911113436@marcus-boerger.de> <200709112040.10581.larry@garfieldtech.com> X-Google-Sender-Auth: c4f488486737ff13 Subject: Re: [PHP-DEV] multiple namespace per file From: davidc@php.net ("David Coallier") On 9/11/07, Larry Garfield wrote: > On Tuesday 11 September 2007, Marcus Boerger wrote: > > Hello Stanislav, > > > > Tuesday, September 11, 2007, 1:21:07 AM, you wrote: > > > Hi! > > > > > > Following the feedback from the community, we (mostly me and Dmitry) > > > tried to find a good model that would allow multiple namespaces per file > > > without running into too many problems and complications, and would > > > allow to bundle multiple namespaced files together without > > > modifications. It looks like it is possible to do, but only under the > > > following condition: the file can have multiple namespaces, but if the > > > file has namespaces, then it can have no code outside namespaces. > > > > > > For example, this would work: > > > namespace A; > > > class X {} > > > namespace B; > > > class Y {} > > > > This looks very messy. We should either go with curly braces or with one > > namespace at the top of a file. And even if we do multiple namespaces per > > file. I guess we do not allow a naespace to be spread onto several files, > > right? > > From a readability-usability perspective (which is all I am able to offer), > I'd have to agree with Marcus. The syntax should follow the structure of the > parser. So either: > > namespace Foo; > class X {} > function bar() {} > ?> > > or > > namespace Foo { > class X {} > } > > namespace Baz { > function bar() {} > } > > I agree that allowing stuff in a file outside of a namespace if namespaces are > used would be all kinds of confusing with either syntax. > > -- > Larry Garfield AIM: LOLG42 > larry@garfieldtech.com ICQ: 6817012 > > "If nature has made any one thing less susceptible than all others of > exclusive property, it is the action of the thinking power called an idea, > which an individual may exclusively possess as long as he keeps it to > himself; but the moment it is divulged, it forces itself into the possession > of every one, and the receiver cannot dispossess himself of it." -- Thomas > Jefferson > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Most of us do agree, but Stas specifically specified that this is not a { } thread :) -- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18