Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:107779 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 2603 invoked from network); 7 Nov 2019 12:36:20 -0000 Received: from unknown (HELO php-smtp3.php.net) (208.43.231.12) by pb1.pair.com with SMTP; 7 Nov 2019 12:36:20 -0000 Received: from php-smtp3.php.net (localhost [127.0.0.1]) by php-smtp3.php.net (Postfix) with ESMTP id 098EB2CA32B for ; Thu, 7 Nov 2019 02:26:13 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp3.php.net X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS3301 81.224.0.0/12 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) Received: from v-smtpout3.han.skanova.net (v-smtpout3.han.skanova.net [81.236.60.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp3.php.net (Postfix) with ESMTPS for ; Thu, 7 Nov 2019 02:26:11 -0800 (PST) Received: from [192.168.7.5] ([213.64.245.126]) by cmsmtp with ESMTPA id SezRiqXnjXLfmSezRiIzqV; Thu, 07 Nov 2019 11:26:10 +0100 To: Claude Pache , Theodore Brown Cc: Reinis Rozitis , PHP Internals References: <5d976928.1c69fb81.db3a8.78daSMTPIN_ADDED_MISSING@mx.google.com> <000601d57dc7$ddb9e890$992db9b0$@roze.lv> Message-ID: <18b8e210-8f82-67c1-3fd5-9f651dc7c086@telia.com> Date: Thu, 7 Nov 2019 11:26:10 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-CMAE-Envelope: MS4wfAzkgHQrMwOgKYoJvjgb7sPEfTR2tWg1Spqk6XRvfwPSeyH+Cwgt/cjn/fNeZG3mP6KxyTmDsNacUbiDT+uHUhitPnjwCB7ON3u6Eu4Q5CXuNdqyyUVf N9O6+nhI/6jyaw1Kf5CdCvlsxxGqvVo8cKV4hju0PHRgRnSLEqWKqOvt6tj3tXqpWkuUGmKVyGAowYaa1HSvpKnmLD9YFV8Zl5AZESD6QUIyJ/e3+xH9fjWY 5fQ4PAZuGJJLTBBsl5ITdz4Mpo9TrjVBvWcuJV5r90o= X-Envelope-From: Subject: Re: [PHP-DEV] [RFC] Deprecate Backtick Operator (V2) From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) Den 2019-10-31 kl. 16:48, skrev Claude Pache: >> Le 31 oct. 2019 à 15:59, Theodore Brown a écrit : >> >> Of course there will always be an infinite number of logical ways to >> structure a program, but this is quite different from having two >> different syntaxes in a language that do exactly the same thing. The >> latter is confusing since it's no longer clear which syntax should be >> used. The same situation existed with the curly brace array/string >> access syntax, which was deprecated in PHP 7.4. >> > Yeah, curly brace string access syntax were deprecated in PHP 7.4, and it was IMO an error. Last day, I reviewed an old library (PHPMarkdown), whose algorithm (probably directly ported from the original markdown written in Perl) was not very readable. Replacing all $string{$index} instances with $string[$index] made it even less readable, because the conventional distinction between string indexes and array indexes used in that library (and in several others libraries) were lost. > > Sorry for the rant. But the message is: Existence of precedent is not an argument, because it may be a bad precedent. > > —Claude Hi, I think that RFC was an example where there was a clear cut case for removing curly brace array access, but not equally clear on to remove it for curly brace string access. In my eyes that RFC would have benefited from having two votes, but the baby went out with the bathwater so to speak. r//Björn L