Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88859 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 69395 invoked from network); 16 Oct 2015 19:01:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2015 19:01: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.154 cause and error) X-PHP-List-Original-Sender: bjorn.x.larsson@telia.com X-Host-Fingerprint: 81.236.60.154 v-smtpout1.han.skanova.net Received: from [81.236.60.154] ([81.236.60.154:38072] helo=v-smtpout1.han.skanova.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 30/38-19126-3A941265 for ; Fri, 16 Oct 2015 15:01:56 -0400 Received: from [192.168.7.4] ([195.198.188.252]) by cmsmtp with SMTP id nAGGZTG6tnMefnAGGZK4Q3; Fri, 16 Oct 2015 21:01:52 +0200 To: Sammy Kaye Powers References: Cc: PHP Internals Message-ID: <562149A0.8050504@telia.com> Date: Fri, 16 Oct 2015 21:01:52 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4wfMCz2t6NlA85PkQPJb2DypPSbtihSsu5VFLu0t3HqAoaJpXfi9pkxfrlen9gvSc2AzBFmKvBB2OTxwaB41qJfuILc6YmTwvM5G9cGNbi0vH1jRHzZ2PFP20g5wFDfOktLJ5Yx1PMWocGLVIsCTsS4kwbJudknYPErnCjeYfKlfuOHc1eib+02Ofci0oQ1mPP4vKl/mBp9a16jizWDvQLz+A= 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?=) 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