Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32222 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31358 invoked by uid 1010); 10 Sep 2007 23:28:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 31342 invoked from network); 10 Sep 2007 23:28:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2007 23:28:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=david.coallier@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=david.coallier@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.188 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.188 rv-out-0910.google.com Received: from [209.85.198.188] ([209.85.198.188:37452] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A4/90-28088-313D5E64 for ; Mon, 10 Sep 2007 19:28:20 -0400 Received: by rv-out-0910.google.com with SMTP id k15so1215699rvb for ; Mon, 10 Sep 2007 16:28:15 -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=mFxMsMtfTLsFuXkk7CeRX9fetCHi4nDwDuSYvZXi2k0=; b=VT71qRNxPx3VMuheAvL1i+R/XPXWrO/bPmEJkxwbGY8NwsEk6VR/XF+uol67yl3QM7Z6BGGyMUciYSKT+SJEzINLKe6PGgap5pfKUrwz/OGrFd2R7OwFA63sK/vVg+kHAwCYZFriyNEDfBw15l0deIxZ9VjQGf8WSvi7oR9Aw/M= 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=BFIgex5D1H5Svhg7SN+o9HghsSaBVCHX9SzDavGvEOhq5LKA+w5/xor3Lov0Q+gXSCRifMmNHZRArshkRvhklT2EfUFSFvjfXdVHbaqtGAUJsn7A/tgwT0vNgQjuGzgu0cqecHpvl7rjQms6gWK45f+erVgtQ2yxeAbyOHERuxg= Received: by 10.141.27.18 with SMTP id e18mr2083494rvj.1189466895074; Mon, 10 Sep 2007 16:28:15 -0700 (PDT) Received: by 10.140.127.15 with HTTP; Mon, 10 Sep 2007 16:28:15 -0700 (PDT) Message-ID: Date: Mon, 10 Sep 2007 19:28:15 -0400 Sender: david.coallier@gmail.com To: "Stanislav Malyshev" Cc: "PHP Internals" In-Reply-To: <46E5D163.4050800@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46E5D163.4050800@zend.com> X-Google-Sender-Auth: 94de51727773d311 Subject: Re: [PHP-DEV] multiple namespace per file From: davidc@php.net ("David Coallier") On 9/10/07, Stanislav Malyshev 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 would not work: > class X {} > namespace A; > class Y {} > > This would not work either: > require 'foo/bar.php'; > namespace A; > class X {} > > This however would work: > namespace A; > require 'foo/bar.php'; > class X {} > namespace B; > class Y {} > > So, for the people that wanted multiple NS per file, would such solution > work? > > P.S. this is *not* a "should we use braces" thread, so please don't :) Good call :) > -- > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > Ok, I was wondering to myself, do you guys think it would be possible to do something like having an endnamespaces; keyword that would put an end to the namespace definition? For instance: I am trying to find a way to put a delimiter to the namespaces definitions.. I'm ready and open for a good and constructive discussion :) No more hate. -- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18