Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 22517 invoked from network); 31 May 2008 13:02:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2008 13:02:23 -0000 Authentication-Results: pb1.pair.com header.from=letssurf@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=letssurf@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.132.241 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: letssurf@gmail.com X-Host-Fingerprint: 209.85.132.241 an-out-0708.google.com Received: from [209.85.132.241] ([209.85.132.241:64188] helo=an-out-0708.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/37-02182-E5C41484 for ; Sat, 31 May 2008 09:02:23 -0400 Received: by an-out-0708.google.com with SMTP id c14so126355anc.1 for ; Sat, 31 May 2008 06:02: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:references; bh=dUeHqXT6uzHO1pH1v/pGtbNx6C1GeFKO8L/BetcjiTM=; b=dqeQ+i70fjHWZeC212lIPEI1J7Y0+R2ER0PGihV2/2giMVBsld5ms6YREBGelxY4e+JFwqcvUm6e+2angdreEU9CUtDurDnkImFdy4VMyvw8fJ/MuyCigB/fTmrUdzKL1DHBpOS/c8a9TBFCJOkOMVzgmqbfe03XmKAQr1ETCcg= 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:references; b=kO/61sDuPWlMf8wW4RgDJ26SV0BaakYFSvyd5rXf51RqrjCjwDvWEczjIblRGft9Nq30uNShssE1Uhj8nHLGnTQPcxa3hozGEnIKoExRyUvyZjRoM9qzTVi+xbjbpE+HuhSsEtLm+s2sLdRAUZm8DQlCUikC8779AzzUWsjJiSg= Received: by 10.100.142.4 with SMTP id p4mr6293731and.23.1212238940254; Sat, 31 May 2008 06:02:20 -0700 (PDT) Received: by 10.100.126.9 with HTTP; Sat, 31 May 2008 06:02:20 -0700 (PDT) Message-ID: <462e563f0805310602t350f8c29p96357b65aef2d14a@mail.gmail.com> Date: Sat, 31 May 2008 14:02:20 +0100 To: "Stan Vassilev | FM" Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9135_32457655.1212238940183" References: <462e563f0805310543u3c5a87fbkaae6ab0b0653d67b@mail.gmail.com> Subject: Re: [PHP-DEV] Alternative to multiple namespaces per file From: letssurf@gmail.com ("James Dempster") ------=_Part_9135_32457655.1212238940183 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline I would agree with you, I think namespaces should wait for a later version. Maybe 6 or even later. I believe there are many problems that need to be sorted be namespaces hit release. Maybe we could do something like so. namespace Fully::Qualified::Class::Name class Declaration extends Whatever implents MyInterface { } I have reservations in using :: as a resolution operator which can easily clash with normal class space usage. Is it too late to have these discussions?? It seems I missed the big namespace discussions on the mailing list and things have already gone ahead. /James On Sat, May 31, 2008 at 1:51 PM, Stan Vassilev | FM wrote: > Hi, > > The community wanted namespaces. This is not exactly the namespaces it > wanted, but since they're going in, I think the best course of action is to > solve the big obvious problems so they are at least usable and extendable in > future versions of PHP. > > If you have to ask *me* personally, I'd not put namespaces in 5.3 and have > a big discussion about the entire implementation. But alas. > > I think those "showstopper" problems with namespaces are: > > 1) one namespace per file (look at frameworks like Symphony which compile > their classes together for performance, they will never be able to switch > to, or support namespaces). > > 2) silent collisions between namespaced function and static method in a > class with the same name (no errors or anything). > > 3) different resolution rules for userspace and internal functions. > > 4) subtly different resolution rules for functions/classes/constants > > So I'm trying to to address 1) in this thread. > > Regards, > Stan Vassilev > > ----- Original Message ----- > *From:* James Dempster > *To:* Stan Vassilev | FM > *Cc:* internals@lists.php.net > *Sent:* Saturday, May 31, 2008 3:43 PM > *Subject:* Re: [PHP-DEV] Alternative to multiple namespaces per file > > what I find really annoying about all this namespace stuff, is how would > that be any different from > > class Fully_Qualified_Class_Name_Declaration { } > > /James > > On Sat, May 31, 2008 at 1:10 PM, Stan Vassilev | FM > wrote: > >> >> Hi, >> >> I suppose this has been discussed before, so I'll not repeat reasons >> unless requested, but I just want to offer a possible feature to mitigate >> the impact of "one namespace per file", which doesn't have controversial >> syntax and hopefully less difficulties in the implementation: >> >> class Fully::Qualified::Class::Name::Declaration { .... } >> >> same as: >> >> namespace Fully::Qualified::Class::Name; >> >> class Declaration { .... } >> >> ... except of course this allows classes of different namespaces to be >> declared in one file. Most namespace-enabled languages consider the above >> declarations equivalent. Share your opinions. >> >> Regards, >> Stan Vassilev > > > ------=_Part_9135_32457655.1212238940183--