Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:110739 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 93746 invoked from network); 27 Jun 2020 11:32:12 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 27 Jun 2020 11:32:12 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id BD1C91804A8 for ; Sat, 27 Jun 2020 03:20:19 -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=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE 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-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (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 03:20:18 -0700 (PDT) Received: by mail-wr1-f51.google.com with SMTP id o11so11805638wrv.9 for ; Sat, 27 Jun 2020 03:20:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WWLUgQBw9t45kRQTVMja7Q6PXKmflLCNwXsIEiDbppM=; b=pD9rktMHqIZEmFdpUVX0sEvsccyjLhgS7xJu9ZOurfwVLS6UOBbTi23l+7hlgonWXm gzwSI3aWOtaqWagLs3K+AipkNjACtSaYOU8EpjW2Q6rC6th7OPqrqUg9RY6+befVUYBM aeKBNw9+ii1MLlZ48tiQJac/bORjYBqSqk+wwJ6BjsGmF0rk7LNKReuzEM49uh+66SJW iqqNpPmpfhpXeMJAl8AzGAKBxMOXzpDDzeu/YHvaMgUouZMDSFCmBP+hv5wVj9tFY0MK pfxQarAfwFR9sa63e7r1wKYGbbF0KKuucLDfD5VEKBoqLBJ1gQJbweXhw91rURkbhyLq cfDA== 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=WWLUgQBw9t45kRQTVMja7Q6PXKmflLCNwXsIEiDbppM=; b=FoCcM1EKy0R3tKphgvH99xvvkgRelAF9JikDQA3zoHFrdrhLmNrLIoPbZ84Vz6naGg w7il/7nz/Mj0SGRiH+Fm2FwL1a13C4tyXTHgCU3ESoJsIdhmmBVDu9md/nmIChDuYEcE FDfa63j4fFXldLmGP8zb3lDHOUgclOt2vhMaKkcujdDVX7DaA1ngPiY6RaIxyAcodKOI 69SxBeXxMCc+SCqkOJPKVnN6nXJEX66CmFdaNXC1hGlDN4E8uJhyaR1/Xx7DK1D4H3vF GR+gUeplNDLsCems6gVGHcvHf/n4627zUBW9zPENG3H6TheiPTbHLhcfM0RHyirkDA/L upJw== X-Gm-Message-State: AOAM533HVS7jHeU8SLXEtr4Q5bfRpjICnzXalz72DSnDBW5YP4hr/NFQ Z4oljT7HRoh/5DCUs/Tzu8EyjckxOor7v2rH9/tk446a X-Google-Smtp-Source: ABdhPJzPvMntvjXQHvwuytp/JN8/eeO6OaSfB5z/vdVE7AVmihX2DiCWbyzv4tWAEJ0J0VCnWnkndmgXeKckEcj/35A= X-Received: by 2002:adf:e40e:: with SMTP id g14mr8563546wrm.271.1593253214435; Sat, 27 Jun 2020 03:20:14 -0700 (PDT) MIME-Version: 1.0 References: <5ef71806.1c69fb81.4111d.f75aSMTPIN_ADDED_MISSING@mx.google.com> In-Reply-To: <5ef71806.1c69fb81.4111d.f75aSMTPIN_ADDED_MISSING@mx.google.com> Date: Sat, 27 Jun 2020 12:20:03 +0200 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: multipart/alternative; boundary="000000000000e24df505a90e2b9a" Subject: Re: [PHP-DEV][RFC][VOTE] Rename T_PAAMAYIM_NEKUDOTAYIM to T_DOUBLE_COLON From: kontakt@beberlei.de (Benjamin Eberlei) --000000000000e24df505a90e2b9a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jun 27, 2020 at 11:57 AM Andrea Faulds wrote: > Hi, > > G. P. B. wrote: > > https://wiki.php.net/rfc/rename-double-colon-token > > I have voted No to this, and I hope I can convince some others to do the > same. > > T_PAAMAYIM_NEKUDOTAYIM is such a famous token that there is probably > nobody in internals who doesn't know what it means, and for new > contributors, it is easy to find the definition, and note that it is > hardly the only token name that they will need to look up. It is also a > fun nod to the history of PHP, and I think it would be a shame to lose > that. > > I mention the internals usage first and foremost, because it should be > remembered that token names are merely an implementation detail of the > PHP interpreter, unless you're using token_get_all (which by the way > already has the alias T_DOUBLE_COLON). In other words, it's not > something the vast majority of userland developers should ever encounter > or have to think about. > > Of course, if T_PAAMAYIM_NEKUDOTAYIM was never encountered by userland > developers, this RFC wouldn't exist. The thing is, I don't think > T_DOUBLE_COLON should be encountered by userland developers either =E2=80= =94 in > my view, as an implementation detail, token names shouldn't be part of > parser error messages at all. If we were to remove token names from the > parser errors, we would avoid the problem this RFC seeks to solve. For > most tokens we could simply display the characters it corresponds to > (e.g. "::" for T_PAAMAYIM_NEKUDOTAYIM, which we already do!), and for > those with variable content (e.g. T_STRING) we could display a > human-readable description of what is expected (e.g. "an identifier"). > > I think the case for not renaming T_PAAMAYIM_NEKUDOTAYIM, and instead > improving the error messages, is stronger when you consider that is not > the only token with a name that might confuse people outside internals. > For example, T_STRING is a very common token, but the name is probably > going to surprise most userland developers who encounter it in an error > message, because it doesn't mean a literal string. Even for tokens with > more conventional names, it is unnecessary extra information. I think > renaming just T_PAAMAYIM_NEKUDOTAYIM is not a full solution to the > problem this RFC intends to solve. > > Apropos of that: > > > We did acknowledge the suggestion of dropping the token name from the > > error message directly, but in our opinion this is an orthogonal > > change to the one proposed, and has the risk of not landing in PHP > > 8.0. > > Is PHP 8.0 an all-important? If we _don't_ rename the tokens, but simply > improve the error message, that might be allowable in a patch release > (e.g. 8.0.1). > > (I also don't think we should rush things if we are unsure about them, > given the consequences that has had in the past.) > This is the same reason that I voted no. 1. The token name has historic value and should be preserved as such 2. as several people suggested in the original RFC discussion, we should just not display tokens in error messages anymore. That should have been the RFCs solution, not renaming the token > > Thanks, > Andrea > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > > --000000000000e24df505a90e2b9a--