Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53912 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 38527 invoked from network); 12 Jul 2011 09:09:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Jul 2011 09:09:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=pierre.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=pierre.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.42 as permitted sender) X-PHP-List-Original-Sender: pierre.php@gmail.com X-Host-Fingerprint: 74.125.83.42 mail-gw0-f42.google.com Received: from [74.125.83.42] ([74.125.83.42:58589] helo=mail-gw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1D/F2-07173-05F0C1E4 for ; Tue, 12 Jul 2011 05:09:37 -0400 Received: by gwb17 with SMTP id 17so2100324gwb.29 for ; Tue, 12 Jul 2011 02:09:33 -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=x64hZoRoZdI4IM79X4bwqE0BPJckMvHnq/jpvUVQlQw=; b=qQKYtwUxeyw7YAHx1wDnDQzHlHkIufonB3shN6J6erJy9JhAyJGLahpcGycZbpx60h ir5iwwyuRifUehriW52TbC2BJ4xpYmsKDjJPtRwzgQnWVxfpWIdXf0o0dEru34+0kyhA 2bb2a+ftxUeaPh+lEqcM5ggDn3JrBTdaIyZxs= MIME-Version: 1.0 Received: by 10.236.192.166 with SMTP id i26mr138509yhn.114.1310461773242; Tue, 12 Jul 2011 02:09:33 -0700 (PDT) Received: by 10.147.137.11 with HTTP; Tue, 12 Jul 2011 02:09:33 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 Jul 2011 11:09:33 +0200 Message-ID: To: Patrick ALLAERT Cc: Stas Malyshev , PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long)) From: pierre.php@gmail.com (Pierre Joye) hi, As of now I do not think we should allow this change, whether the RFC is accepted or not does not matter as it will badly break BC. Unless there is a patch allowing this change without affecting existing code (main point being namespaced code working smoothly), this RFC should be rejected. Cheers, On Sun, Jul 10, 2011 at 6:41 PM, Patrick ALLAERT w= rote: > 2011/6/17 Stas Malyshev : > > [snip] > >> 2. Make primitive type names reserved words (in case we ever want some f= orm >> of scalar typing or anything else with scalar types). Using them as >> identifiers would return parse error for now. May have BC implications. > > I am not sure it is a good idea to make them reserved words without a > clear reason for doing so. > > I'm sure some projects have defined classes with those keywords in > some namespace (to ensure they wouldn't conflict with possible PHP > built-in stuff) like in: > > namespace \Types { > =A0 =A0class Int { > =A0 =A0 =A0 =A0// ... > =A0 =A0} > =A0 =A0class Float { > =A0 =A0 =A0 =A0// ... > =A0 =A0} > =A0 =A0class String { > =A0 =A0 =A0 =A0// ... > =A0 =A0} > =A0 =A0// ... > } > > 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 would be +1 if this could be done for the global namespace only. > However, -1 if this would break the usage of classes like \Types\Int, > \Types\String, ... would break. > > Please, rethink your vote taking this into account. I don't think it > is required to hurry up on that decision while we still don't have a > *clear* proposition for scalar type hinting. > > Cheers, > Patrick > > [snip] > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --=20 Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org