Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:40657 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 27218 invoked from network); 24 Sep 2008 06:56:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Sep 2008 06:56:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=slackmase2@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=slackmase2@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.157 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: slackmase2@gmail.com X-Host-Fingerprint: 72.14.220.157 fg-out-1718.google.com Received: from [72.14.220.157] ([72.14.220.157:33635] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B3/93-00346-794E9D84 for ; Wed, 24 Sep 2008 02:56:23 -0400 Received: by fg-out-1718.google.com with SMTP id 16so2155662fgg.23 for ; Tue, 23 Sep 2008 23:56:20 -0700 (PDT) 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=ILokk9C8pSPrd0B4e3CJxq+g0TVHDbhSjZb6tHlY3/U=; b=xZAKkagf1opUQkfm4ll9E8MryHtZi0ocry3s/upGvAi+jQ6oVJw2Pxx4dQKf8sy0nV 0fh8FRCvh7i1lXinZfYfcXW8X4U/50Uy07oWzOgfYvQuN3nipvwAc1ADXAcV6Gu5uwZa LCt0T07HpcaxaFu4HLhxSB28m8rAu37yfABWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=n4BK0e1vZjCtEavmrsv0HXi5CmH/RW67VO2AqKtkUgr+lXCCj7sQPla1lp+vDD6vpY IuDmGqj+hNaCxyXbBjp7phrhk5b3ktSoXbVoSljQ8Jj6YsCdJ7JFTtotW/Y7pVZ1upko 2oqmrscbeZ5hilvcfmCf5Oqc/+tW87riG00iU= Received: by 10.187.213.19 with SMTP id p19mr1030197faq.79.1222239380370; Tue, 23 Sep 2008 23:56:20 -0700 (PDT) Received: by 10.181.30.15 with HTTP; Tue, 23 Sep 2008 23:56:20 -0700 (PDT) Message-ID: <99cd336d0809232356n2427595fl5396a778500c9fb9@mail.gmail.com> Date: Wed, 24 Sep 2008 16:26:20 +0930 To: "Stanislav Malyshev" Cc: "PHP Internals" In-Reply-To: <48D7F5EF.3090202@zend.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48D7F5EF.3090202@zend.com> Subject: Re: [PHP-DEV] namespace issues From: slackmase2@gmail.com ("Andrew Mason") Sounds fantastic to me. Not a fan of the {} namespaces but each to their own. On Tue, Sep 23, 2008 at 5:15 AM, Stanislav Malyshev wrote: > Hi! > > On the ZendCon, we (Marcus, Elizabeth, Andi and myself) had a talk about > what we'd like to do with namespaces, and we arrived at the following > conclusions, which we propose to implement in 5.3: > > 1. Allow braces for namespaces. So, the syntax for namespaces will be: > a) namespace foo; > should be first (non-comment) statement in the file, namespace extends to > the end of the file or next namespace declaration. > b) namespace foo {} > can appear anywhere on the top scope (can not be nested). > Mixing both syntaxes in one file is not possible. The semantics of both > syntaxes will be identical. > > 2. Simplify resolution order for classes in the namespace: unqualified names > are resolved this way: > a) check "use" list if the name was defined at "use", follow that resolution > b) if not, the name resolves to namespace::name > Consequence of this will be that for using internal class inside namespace > one would need to refer to it either as ::Foo or do use ::Foo prior to its > usage. > > 3. Functions will not be allowed inside namespaces. We arrived to conclusion > that they are much more trouble than they're worth, and summarily we would > be better off without them. Most of the functionality could be easily > achieved using static class methods, and the rest may be emulated with > variable function names, etc. > > Comments? > -- > 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 > >