Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79481 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8437 invoked from network); 8 Dec 2014 20:13:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Dec 2014 20:13:43 -0000 Authentication-Results: pb1.pair.com smtp.mail=guilhermeblanco@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=guilhermeblanco@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.180 as permitted sender) X-PHP-List-Original-Sender: guilhermeblanco@gmail.com X-Host-Fingerprint: 209.85.223.180 mail-ie0-f180.google.com Received: from [209.85.223.180] ([209.85.223.180:51043] helo=mail-ie0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 17/E7-62069-67606845 for ; Mon, 08 Dec 2014 15:13:43 -0500 Received: by mail-ie0-f180.google.com with SMTP id rp18so5028035iec.25 for ; Mon, 08 Dec 2014 12:13:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=8zAyrRRpcos0EfCk88yPrco24AK8H+5Wkc27XkabHRY=; b=fYGBuALVdl0syWYxQpoogJuxYfwz7qeEafHDh8nsGqW4Gh/xiskkWwBhiMUbtxI9jh GM+vqPxj3Oy75w7Mk9r1WbA9M+V6ubza3YvuIPnqnEUx+2teguWXfff46FUCxCXKJXUA Nr9PpWFSTtJf21dw03Zk3KXptu+MynKjFJV3Cb+pDwlxYeX9T2hIYTzQNqUUfZ0iDswZ O6mwfhGgtXOWA3GEG9skAO8dJ9GXefYvH9ZLHVFqHddszCO9Jk6Ow7swv7kqDd2N3mSH ZK7PMIg5QT8gkQuRK1SSI9IC+cGtnmakWVdY0GTRJ73OSBGZ8EztqQdqtCDwAX2CRWNT VhfQ== X-Received: by 10.50.3.106 with SMTP id b10mr16448938igb.41.1418069620247; Mon, 08 Dec 2014 12:13:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.238.75 with HTTP; Mon, 8 Dec 2014 12:13:19 -0800 (PST) In-Reply-To: References: Date: Mon, 8 Dec 2014 15:13:19 -0500 Message-ID: To: Nikita Popov Cc: Dmitry Stogov , Levi Morrison , PHP internals Content-Type: multipart/alternative; boundary=089e013a0080fb51ff0509ba0f53 Subject: Re: [PHP-DEV] Zend language parser improvements From: guilhermeblanco@gmail.com ("guilhermeblanco@gmail.com") --089e013a0080fb51ff0509ba0f53 Content-Type: text/plain; charset=UTF-8 Nikita, Shouldn't #3 make more sense taking into consideration this commit: https://github.com/guilhermeblanco/php-src/commit/872a97c8dbc1c8823985d9a0305938c508865a0d It is part of a followup PR https://github.com/php/php-src/pull/937 that removes compiler code checks and delegates to bison, since it's a grammar issue to accept "trait Foo extends Bar". Regards, On Mon, Dec 8, 2014 at 3:06 PM, Nikita Popov wrote: > On Mon, Dec 8, 2014 at 11:45 AM, Dmitry Stogov wrote: > >> I don't see technical problems with the patch. >> However, I also don't see any significant benefits. >> From the user perspective it'll just change error messages and prevent >> "final final class" declarations. >> >> Nikita, what do you think? >> >> Thanks. Dmitry. >> > > The three parts: > > 1. Use ZEND_ACC_FINAL instead of ZEND_ACC_FINAL_CLASS: Looks sensible, > given how many extensions have confused this. We should be careful that > this change does not make anything final that many people extended (even if > it was originally meant to be final.) > > 2. Don't use magic value for ZEND_ACC_TRAIT: Also makes sense, the > behavior of the current value is pretty unclear. > > 3. Changing the grammar to separate class/trait declarations and have a > modifier list: This doesn't really make much sense as things currently are > (only one modifier allowed). I'd suggest to change this when we actually > support multiple modifiers (e.g. with the static classes patch). > > Nikita > -- Guilherme Blanco MSN: guilhermeblanco@hotmail.com GTalk: guilhermeblanco Toronto - ON/Canada --089e013a0080fb51ff0509ba0f53--