Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110753 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 18639 invoked from network); 28 Jun 2020 00:05:34 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 28 Jun 2020 00:05:34 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 926921804B7 for ; Sat, 27 Jun 2020 15:53:50 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_20,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f66.google.com (mail-ej1-f66.google.com [209.85.218.66]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 27 Jun 2020 15:53:49 -0700 (PDT) Received: by mail-ej1-f66.google.com with SMTP id a1so12666276ejg.12 for ; Sat, 27 Jun 2020 15:53:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sGAF72IKQ1X1IOvVSFnXv7lsiBbmJs6yr232HjjHFvw=; b=p3XyU0/Ziik0Gb9ZB6xAM/mXuvetFhOJUOtZZA7RubnVgI6fLvwdwNhGQsm/dR5rCE XoRXdyiX+I5X6RFhn4X76ldvuFdDpfUPlHyOS3aTemeiTbTt8oGICo3u/KNCUn7R/oaa ABBQhlmJWnDFvsEYFyZGfxgjrAJQhrRa25RsubEAwdsILe/WY13ghMhAo5tkNSat6nYs iEdXIdBRSVX6rX0/Y8RYiU2UDr1M+0vy5rdKUcWD8QS6BVImrNgUfJxR6m9P+3AMaTTW 9mTBYWNvfDmXZgw9ftT+v5ZiJ+OoYPWHUmiLrI5sn8+FkD0zeYktxGbTLinP/Y4KNdtH yBww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sGAF72IKQ1X1IOvVSFnXv7lsiBbmJs6yr232HjjHFvw=; b=tO+BncszK62BTUHxG4oypAmhx6m8+Z7hZ/5ALyNLboyHVF6Y0LUwmtraayBFE+xGLB 11BQuhXmxSHU01ryFlYgRdpOSN3fyTrUywWoKU8AhGhsjfqokRHLjvbznS5f/7TDjvpa MIudbGI7VpUfaWlyXzY1gmxBSN0nAjDysMmNtrtsmY3/4ODC36VZdq3xbkY/ScZMMQyR eS6D63x9QjAFwLXquAzjO708PMVniBju6iWlcjty0Wym7lQ7vTMppOA2D6bEiUBFh0a3 oqYv7/KfRKhlVCDdsuBvdhkSVBsbZI7lRUc0sPEiR5FwZzaVab/oD3Xjdta0mi7BrqDP xKKA== X-Gm-Message-State: AOAM531Ysw9R9F+H90OZnUgb38WnygvMMmYEJ3o0bMgLYOdaIj7qqFRK Slog6De1WmxLkZbQube9GQyVUHwTSOLsanmFxDNq30xa X-Google-Smtp-Source: ABdhPJyk9zutiaM6tOdNyp+irGnXScMH+YsYRhrzbaHOTmhCfKc25hUWYukR5LN5T5ol+DBlUbBilnUUWt2BpY6nCVI= X-Received: by 2002:a17:907:2105:: with SMTP id qn5mr1990591ejb.308.1593298426471; Sat, 27 Jun 2020 15:53:46 -0700 (PDT) MIME-Version: 1.0 References: <5ef7505d.1c69fb81.a3d3d.67e7SMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5ef7505d.1c69fb81.a3d3d.67e7SMTPIN_ADDED_MISSING@mx.google.com> Date: Sun, 28 Jun 2020 00:53:35 +0200 Message-ID: To: Andrea Faulds Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000bb299c05a918b248" Subject: Re: [PHP-DEV][RFC][VOTE] Rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON From: george.banyard@gmail.com ("G. P. B.") --000000000000bb299c05a918b248 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Andrea, Benjamin, and others, Better error messages are obviously better than just replacing the name of the token, however this argument is saying that because this isn't perfect let's do nothing. I wasn't aware that Rowan had made good progress on his patch, however, if this patch needs an RFC, which it might not, there is still no guarantee on having better error messages for PHP 8.0. Now, this may just me, but I find the argument that "::" is present relatively weak as when I scan a PHP parse error, the first thing I look for is the token name as there are only 3 parse errors which have the added information of what the token represents, namely T_SL, T_SR, and T_PAAMAYIM_NEKUDOTAYIM. T_SL and T_SR also have this issue but I would expect beginners to not hit this as often as I don't expect them to do anything with bit shifts, and the only other way that they may encounter it is by doing a bad git merge. I find it highly frustrating, and borderline offensive, that we are being asked to go from a simple, non BC breaking, easy to enact change, to a semi-major overhaul of how error messages should look like. I personally have no interest in learning Bison and how to implement that as a separate improvement to PHP. I'm just glad that Rowan decided to take on this challenge. Even if better error messages come about, some people will still need to deal with the token, such as static analyser, code sniffers, code style tools, etc. Obviously people working on these tools aren't beginners and deal with the weird token name just fine, or use the T_DOUBLE_COLON alias if they can. But why should it still be like this? This change has no BC break, makes English the consistent language for token names. Moreover, something being historic doesn't mean it shouldn't be touched. My perception is that most of the community finds it baffling why anyone would be against this change. On Sat, 27 Jun 2020 at 15:57, Andrea Faulds wrote: > As for parser errors, I don't know how easy they would be to improve=E2= =80=A6 is > it even possible for us to do so without using a hand-written parser > instead of an auto-generated one? (I have no idea.) This may be done using Bison 3.6, which got released in May of this year, as seen by this PR: https://github.com/php/php-src/pull/5416 However, I don't expect us to be able to use this as Bison 3.6, won't be present on most distrib until a couple of years. Best regards George P. Banyard --000000000000bb299c05a918b248--