Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:38022 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 20643 invoked from network); 31 May 2008 12:51:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 31 May 2008 12:51:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=sv_forums@fmethod.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sv_forums@fmethod.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain fmethod.com from 69.16.228.148 cause and error) X-PHP-List-Original-Sender: sv_forums@fmethod.com X-Host-Fingerprint: 69.16.228.148 unknown Linux 2.4/2.6 Received: from [69.16.228.148] ([69.16.228.148:39582] helo=host.fmethod.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F7/D6-02182-9D941484 for ; Sat, 31 May 2008 08:51:38 -0400 Received: from [83.228.56.37] (port=4204 helo=pc) by host.fmethod.com with esmtpa (Exim 4.68) (envelope-from ) id 1K2QYY-0000Tu-Nh; Sat, 31 May 2008 07:51:35 -0500 Message-ID: To: "James Dempster" Cc: References: <462e563f0805310543u3c5a87fbkaae6ab0b0653d67b@mail.gmail.com> Date: Sat, 31 May 2008 15:51:25 +0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0066_01C8C336.2E7096C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.fmethod.com X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - fmethod.com Subject: Re: [PHP-DEV] Alternative to multiple namespaces per file From: sv_forums@fmethod.com ("Stan Vassilev | FM") ------=_NextPart_000_0066_01C8C336.2E7096C0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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,=20 Stan Vassilev=20 ----- Original Message -----=20 From: James Dempster=20 To: Stan Vassilev | FM=20 Cc: internals@lists.php.net=20 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=20 ------=_NextPart_000_0066_01C8C336.2E7096C0--