Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32225 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41602 invoked by uid 1010); 10 Sep 2007 23:58:43 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 41586 invoked from network); 10 Sep 2007 23:58:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Sep 2007 23:58:43 -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.187 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.187 rv-out-0910.google.com Received: from [209.85.198.187] ([209.85.198.187:15217] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 97/72-28088-23AD5E64 for ; Mon, 10 Sep 2007 19:58:42 -0400 Received: by rv-out-0910.google.com with SMTP id k15so1221681rvb for ; Mon, 10 Sep 2007 16:58:39 -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=iQ3w4ZmULJWOiZPKKsNrWn6FF5QPhJDTKu/nsBRIoNk=; b=P0uuTDwiLLIGAxhm85scHJ4UyIAAb8MQfx8pBdmLnjGlzFm8XYHbS5TuZHEdKqU+HHjv3ywZetarbkvScO3sYmfj5o7BNxeK3DDOd2YsXzabiEiArKT/xXZKyppMPXpcT6ZjUcq/ufFTCcKd9R/OO8MEYS2+whHasLoE4nMaP9Y= 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=sKAwsagOx6WmRcvwp64D9rYqAD4EX9dAaCFsWzK8ILEz5QlAyfuli2HZtJd0AxITbfzWRr2cPzJNZkuaZ5bYw4p44iE3sqa1Ze/pWzOljRz0OvuZzpml+nJdnVVHgBntuN7eG+WPu3U7NsiS/ilpczZjTRB2Hi+nlCi67bn8kYk= Received: by 10.141.196.13 with SMTP id y13mr2100874rvp.1189468719696; Mon, 10 Sep 2007 16:58:39 -0700 (PDT) Received: by 10.140.127.15 with HTTP; Mon, 10 Sep 2007 16:58:39 -0700 (PDT) Message-ID: Date: Mon, 10 Sep 2007 19:58:39 -0400 Sender: david.coallier@gmail.com To: "Stanislav Malyshev" Cc: "PHP Internals" In-Reply-To: <46E5D567.8090205@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> <46E5D567.8090205@zend.com> X-Google-Sender-Auth: 5172586be9b5dde4 Subject: Re: [PHP-DEV] multiple namespace per file From: davidc@php.net ("David Coallier") On 9/10/07, Stanislav Malyshev wrote: > > 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? > > Oh no :) It doesn't look good and it doesn't solve the problem. Hint: > the braces have the same problem (that's why I asked not to suggest them > :) since the problem is per-file imports vs. multiple global spaces. I > can explain more if you wish but basically it's not about finding the > right delimiter, it's about making something that would work when files > are combined together (repeatedly). If you allow global space there, it > starts to look and work seriously weird. > -- Yeah you are right, I also thought it looked extremely ugly. I have thought of a few things (since I am the combined/aggregated files advocate) and I actually think that this approach (Having multiple namespace per file like you mentionned) would work pretty well. After taking a look at this problem from another point of view, I realized that if we can manage to make the multiple namespace per file as you mentionned earlier then it would be rather trivial. I like the implementation you suggested earlier, you got +1 from me ;-) More question, just like this, when you do: is somefile.php also included in the B namespace since you cannot include it in global scope. Next step ? Renaming to packages ? :P (No please dont anyone it's just a joke) > Stanislav Malyshev, Zend Software Architect > stas@zend.com http://www.zend.com/ > (408)253-8829 MSN: stas@zend.com > > Thanks, -- David Coallier, Founder & Software Architect, Agora Production (http://agoraproduction.com) 51.42.06.70.18