Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53878 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96204 invoked from network); 11 Jul 2011 15:14:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Jul 2011 15:14:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.218.42 mail-yi0-f42.google.com Received: from [209.85.218.42] ([209.85.218.42:50889] helo=mail-yi0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 10/B3-09103-3531B1E4 for ; Mon, 11 Jul 2011 11:14:27 -0400 Received: by yih10 with SMTP id 10so1748522yih.29 for ; Mon, 11 Jul 2011 08:14:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=m0a1Af2ooaxOb0UZpwLaKeFTKU3Pob1DQE6rj7ZrI9E=; b=P4+2kwrMtJwkYIoEHCj/WZqOmonZry97weJwy/sLdNXLSH/1VKqt0tLyjzRfvQHxTc Das349MI0gWxs0bCvY4P2VFXTWqblBJ3cqiIJcagvdxmgCrGcMgN6tA/w1ctNtKwlBrH iG+kXIl4D81B7pMlIQiloCosaSxODRAB/Z/I0= MIME-Version: 1.0 Received: by 10.236.76.232 with SMTP id b68mr5568146yhe.223.1310397263869; Mon, 11 Jul 2011 08:14:23 -0700 (PDT) Received: by 10.147.38.17 with HTTP; Mon, 11 Jul 2011 08:14:23 -0700 (PDT) In-Reply-To: <25.72.09103.BF11B1E4@pb1.pair.com> References: <4E1A012F.3030703@sugarcrm.com> <25.72.09103.BF11B1E4@pb1.pair.com> Date: Mon, 11 Jul 2011 17:14:23 +0200 Message-ID: To: "Matthew Weier O'Phinney" Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Re: Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long)) From: tyra3l@gmail.com (Ferenc Kovacs) On Mon, Jul 11, 2011 at 5:08 PM, Matthew Weier O'Phinney wrote: > On 2011-07-10, Stas Malyshev wrote: >> On 7/10/11 9:41 AM, Patrick ALLAERT wrote: >> > Developer may have taken care of defining them in a specific >> > namespace, would it be possible to not break their application while >> > making them reserved keywords in the global namespace only? >> >> I don't think there's such thing in PHP as namespaced keywords. Keywords >> are processed by the language parser, which knows next to nothing of >> namespaces. >> We could, maybe, prohibit creation of classes with names identical to >> type names, which is different from making it reserved word, and on that >> stage we know the full class name. > > I think that's a bad idea. The point of namespaces is to allow us to > override classes (and functions, and constants) within that namespace. > If I can't do this: > > =C2=A0 =C2=A0namespace Foo > =C2=A0 =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0class String > =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0} > > then I'd consider the implementation too restrictive. > the parser is a little bit dumb, and the namespaces isn't really first class citizens in php AFAIK, so it's not a deliberate restriction imo, just a technical, which could be solved. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu