Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100345 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23273 invoked from network); 1 Sep 2017 15:13:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2017 15:13:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=bjorn.x.larsson@telia.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=bjorn.x.larsson@telia.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain telia.com from 81.236.60.156 cause and error) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.156 v-smtpout3.han.skanova.net Received: from [81.236.60.156] ([81.236.60.156:49666] helo=v-smtpout3.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9E/0B-04538-23979A95 for ; Fri, 01 Sep 2017 11:13:56 -0400 Received: from [192.168.8.16] ([94.254.95.82]) by cmsmtp with SMTP id nndmdwbZOARCanndmdWjgg; Fri, 01 Sep 2017 17:13:51 +0200 To: Albert Casademont Cc: Sammy Kaye Powers , PHP Internals References: <562149A0.8050504@telia.com> Message-ID: <5fd5d3bf-b0af-014a-6e32-4f982a7b63e6@telia.com> Date: Fri, 1 Sep 2017 17:13:51 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------68D0D4B0EC6CFB37DEC73C4F" Content-Language: en-GB X-CMAE-Envelope: MS4wfFOoYyGnnGNgAdj7q6YwikJsLtA5AacTLk6CKbyT3g8H0+5/Px91yC89OR3Fhs8RQ0Qna1YjDDy004vITMzE3SBNqBi8z7xNA+SO1t9bRPfFi5UfL6NM FLgqfMC5Y0XeQ0J+PacFOYsvsrhKTfYMWnQW3XtFk3ElyDYMaHtkUvGS524/w1+W6/dD8UybWM8FECLZsmMpmwDhQKlOsfjmltFKQgs9iPueH1gSY/I/XHqx X8pA+XzgmajguCla12dqCw== Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) --------------68D0D4B0EC6CFB37DEC73C4F Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Recall that it was superseded by this RFC, partly implemented in PHP 7.2: - https://wiki.php.net/rfc/list-syntax-trailing-commas In my eyes the voting result created a not quite consistent view on how trailing commas are handled in PHP in general. r//Björn Larsson Den 2017-09-01 kl. 14:16, skrev Albert Casademont: > Revisiting this thread. AFAIK this RFC was never put to vote, right? > > On Fri, Oct 16, 2015 at 9:01 PM, Björn Larsson > > wrote: > > Den 2015-10-16 kl. 15:09, skrev Sammy Kaye Powers: > > On Thu, Oct 15, 2015 at 8:28 PM, Marcio Almada > > > wrote: > > Hi, > > 2015-10-14 16:25 GMT-03:00 Sammy Kaye Powers >: > > Hello internals friends! > > I'd like to open a discussion on the RFC to allow > trailing commas in > function arguments. > > https://wiki.php.net/rfc/revisit-trailing-comma-function-args > > > Discuss! :) > > Thanks, > Sammy Kaye Powers > sammyk.me > > Sammy, I think this proposal is too narrow. If we are > going to bother > to change the language, then let's do it consistently and > allow > trailing commas on all lists in the grammar. These are the > ones on > mind right now: > > - use declarations > - group use declarations > - function call argument list > - class member lists (both constants and properties) > - argument list declarations > - arrays (already allowed) > > As exemplified in this gist: > https://gist.github.com/marcioAlmada/75f8f1d47da5dcac2e57 > > > Why? Because it prevents a reality where each PHP minor > version > introduces trailing commas in a new different place, > hurting code > portability. Because it couldn't get more consistent. And more > importantly: because we would get rid of this discussion about > trailing commas, forever j/k :) > > ty, > Márcio > > Hey Márcio! > > Thanks for the suggesting "trailing comma all the things" > idea.  I can > certainly get behind that idea and I think it would offer an > even stronger > argument than just trailing commas on function args. > > I'm curious what others think about broadening the scope of > the RFC to > include all the list grammars in PHP. > > Well, if there is a wish to broaden the scope maybe the voting > should be split on each case? Like the remove depr. func. RFC: > https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 > > > r//Björn > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --------------68D0D4B0EC6CFB37DEC73C4F--