Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53797 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39801 invoked from network); 10 Jul 2011 16:41:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Jul 2011 16:41:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=patrick.allaert@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.42 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 209.85.214.42 mail-bw0-f42.google.com Received: from [209.85.214.42] ([209.85.214.42:59231] helo=mail-bw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/00-38647-A26D91E4 for ; Sun, 10 Jul 2011 12:41:14 -0400 Received: by bwa19 with SMTP id 19so293078bwa.29 for ; Sun, 10 Jul 2011 09:41:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=wQjHNyOcfHKgnk8tZR+y220ggtpAO9BMKobw3a5x0/E=; b=vqhQLV1fdrMzRfiLIky1E4jqZX0aRUIf5wDjQNARM5ldvEEc7f8piedPCb8ZcFl8xD Ykm8wTtYnIyM1TnDgoAkgyBtuyns9m7gnzYhY41WfzG+FAWk08EeDcXb8JgDbL0jiFuq 0QGWdoPdemXjikoRULxz3r3uhe9fcs+TSyTpo= MIME-Version: 1.0 Received: by 10.204.40.199 with SMTP id l7mr2347363bke.103.1310316070475; Sun, 10 Jul 2011 09:41:10 -0700 (PDT) Sender: patrick.allaert@gmail.com Received: by 10.204.40.1 with HTTP; Sun, 10 Jul 2011 09:41:10 -0700 (PDT) Date: Sun, 10 Jul 2011 18:41:10 +0200 X-Google-Sender-Auth: GWl9fWsUyv1pXipJVg0ZmpHVRi0 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Make primitive type names reserved words (Was: Re: [PHP-DEV] [RFC] 5.4 features for vote (long)) From: patrickallaert@php.net (Patrick ALLAERT) 2011/6/17 Stas Malyshev : [snip] > 2. Make primitive type names reserved words (in case we ever want some form > 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 { class Int { // ... } class Float { // ... } class String { // ... } // ... } 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]