Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77224 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80213 invoked from network); 15 Sep 2014 16:42:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Sep 2014 16:42:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=sebastian@php.net; spf=unknown; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sebastian@php.net; sender-id=unknown Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 93.190.64.238 as permitted sender) X-PHP-List-Original-Sender: sebastian@php.net X-Host-Fingerprint: 93.190.64.238 mail-2.de-punkt.de Received: from [93.190.64.238] ([93.190.64.238:42608] helo=mail-2.de-punkt.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DF/81-64534-8F617145 for ; Mon, 15 Sep 2014 12:42:33 -0400 Received: from localhost (localhost [127.0.0.1]) by mail-2.de-punkt.de (Postfix) with ESMTP id 1AD1A3A37E for ; Mon, 15 Sep 2014 18:42:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail-2.de-punkt.de Received: from mail-2.de-punkt.de ([127.0.0.1]) by localhost (mail-2.de-punkt.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pcCEWLHPQZJQ for ; Mon, 15 Sep 2014 18:42:29 +0200 (CEST) Received: from [192.168.178.24] (p57BDE2E0.dip0.t-ipconnect.de [87.189.226.224]) (Authenticated sender: php@sebastian-bergmann.de) by mail-2.de-punkt.de (Postfix) with ESMTPSA id 97AF13A343 for ; Mon, 15 Sep 2014 18:42:29 +0200 (CEST) Message-ID: <541716F6.5040308@php.net> Date: Mon, 15 Sep 2014 18:42:30 +0200 Reply-To: internals@lists.php.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: internals@lists.php.net References: <6893A97A-EC4C-4124-B804-96E2A26B953F@ajf.me> In-Reply-To: <6893A97A-EC4C-4124-B804-96E2A26B953F@ajf.me> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] [VOTE][RFC] Scalar Type Hinting with Cast From: sebastian@php.net (Sebastian Bergmann) Am 14.09.2014 um 01:30 schrieb Andrea Faulds: > https://wiki.php.net/rfc/scalar_type_hinting_with_cast If I understand the "Syntax" section correctly, then int, float, numeric, bool, and string are added as new reserved words (keywords). This would break existing code, for instance userland classes named "String". However, looking at the patch in http://bit.ly/1uADQnD I do not see an addition of new tokens. So maybe there is no problem at all. In any case, I think it would be best to build on the great work Nikita did with the AST-based parser for PHP 7 and refactor the compiler to allow reserved words as names for namespaces, classes, interfaces, ... *before* we introduce new reserved words (and thus BC breaks).