Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69765 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 21917 invoked from network); 22 Oct 2013 12:55:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Oct 2013 12:55:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=bobwei9@hotmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bobwei9@hotmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain hotmail.com designates 65.55.111.105 as permitted sender) X-PHP-List-Original-Sender: bobwei9@hotmail.com X-Host-Fingerprint: 65.55.111.105 blu0-omc2-s30.blu0.hotmail.com Windows 2000 SP4, XP SP1 Received: from [65.55.111.105] ([65.55.111.105:41740] helo=blu0-omc2-s30.blu0.hotmail.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 93/44-10840-EC576625 for ; Tue, 22 Oct 2013 08:55:42 -0400 Received: from BLU0-SMTP123 ([65.55.111.72]) by blu0-omc2-s30.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 22 Oct 2013 05:55:39 -0700 X-TMN: [yy7iwy3EKPk/bkXNt3E1TacRVkqa9oYw] X-Originating-Email: [bobwei9@hotmail.com] Message-ID: Received: from [192.168.178.42] ([188.115.61.21]) by BLU0-SMTP123.phx.gbl over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 22 Oct 2013 05:55:37 -0700 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) In-Reply-To: Date: Tue, 22 Oct 2013 14:55:32 +0200 CC: Developers List PHP Mailing , zeev@zend.com Content-Transfer-Encoding: quoted-printable References: <228247caf0dc0352a6c3f313193ea46a@mail.gmail.com> To: Derick Rethans X-Mailer: Apple Mail (2.1510) X-OriginalArrivalTime: 22 Oct 2013 12:55:37.0098 (UTC) FILETIME=[00E41EA0:01CECF26] Subject: Re: [PHP-DEV] [RFC] [Vote] Keywords as identifiers From: bobwei9@hotmail.com (Bob Weinand) Am 22.10.2013 um 14:28 schrieb Derick Rethans : > On Tue, 22 Oct 2013, Bob Weinand wrote: >> Am 22.10.2013 um 12:54 schrieb "Zeev Suraski" : >>=20 >>> From: Derick Rethans [mailto:derick@php.net] >>> Sent: Tuesday, October 22, 2013 12:12 PM >>>=20 >>>> On Mon, 21 Oct 2013, Bob Weinand wrote: >>>>>=20 >>>>> I have started the vote for extended keyword support RFC: >>>>>=20 >>>>> https://wiki.php.net/rfc/keywords_as_identifiers >>>>=20 >>>> Just to explain why I voted "no". I think the idea is good, but=20 >>>> what I see from the patch is that it adds a *lot* of hand written=20= >>>> state machines which are going to be a pain to maintain. I do not=20= >>>> think this extra maintenance is worth the features - we've done=20 >>>> pretty well without it. >>>=20 >>> Thumbs up for the idea as well, but I don't think we can live with=20= >>> the implementation. BTW, that's a bit of a grey area but I think=20 >>> that even if an idea is accepted, if there's no reasonably clean=20 >>> implementation available for it, I don't think it can go in. >>=20 >> As said, if anyone has a good idea how to improve the implementation,=20= >> I'd be happy to implement it. >=20 > That's not an excuse for adding code that people disagree with. I agree, but if people disagree, then I'd like to hear which code they'd = prefer. >> Btw. Is my implementation so bad? I think it looks far worse than it=20= >> is in reality...) >=20 > You add 350 lines of almost-hand-crafted parsing to the lexer, which I=20= > consider "modereately bad". My point is that I don't think it's worth=20= > this extra complication for a "not really important" feature. About 150 lines parsing, the other are macros and other logic. Actually syntax is mostly: if (buf_one_token =3D=3D T_TOKEN && LEX_IS_CUR_ALPH_TOKEN()) { LEX_CONVERT_CUR_STRING(); } That's not much more complicated than just writing something like: T_TOKEN ALPH_TOKEN { LEX_CONVERT_CUR_STRING(); } in a bison/yacc parser. ___ Also, it is not a really complication; it's just a transparent = additional step you usually don't have to modify and could even remove without loosing any features except the keyword support. Bob Weinand=