Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88855 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44193 invoked from network); 16 Oct 2015 13:09:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2015 13:09:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=sammyk@sammykmedia.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=sammyk@sammykmedia.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sammykmedia.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: sammyk@sammykmedia.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:35477] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 91/34-19126-0F6F0265 for ; Fri, 16 Oct 2015 09:09:05 -0400 Received: by wicll6 with SMTP id ll6so9244106wic.0 for ; Fri, 16 Oct 2015 06:09:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=2n4y6wTbsps0cHW8Xw+RjDKOXaY90tKL1TYJcXcusHU=; b=kE45LaMpsOG6Mbgi0ET4g2Pjbu3GWmrpYtc8SSzf/onq7jRPxecRDCba6ZgfEwNcl8 sskcdYxdcj2axjuYWUuA62CBf+03vo7FurAcLjRG0I09AzM0HNsx249N6v9Q4OYi2TqA NwUg37spLDddb4Lydt7clxRStcDi+LzpmzmgxhgELsTHR2ftXrn9KFtDilMujs/4EE1c YhWCePxPeZYFQQ6Z1UOIQWknEGaALsuFjr37i6Cje+nijoA9E+Ov7AAxxzoyzG1FnPHs 51dbPkA+n9HuKe+75xK8nlTK9nIHM4dWliTSGgqIzvTaP17Gw0W40rQxNYx2KElExhp9 JjXg== X-Gm-Message-State: ALoCoQmIQQSnogsuimO+AyPlWsWLKvFXCglGYBU6jMHTSEwbf+KQmINEp1ZT9vjWLGYkcE25pWmH MIME-Version: 1.0 X-Received: by 10.180.39.193 with SMTP id r1mr4641791wik.57.1445000941735; Fri, 16 Oct 2015 06:09:01 -0700 (PDT) Sender: sammyk@sammykmedia.com Received: by 10.194.79.70 with HTTP; Fri, 16 Oct 2015 06:09:01 -0700 (PDT) X-Originating-IP: [75.150.241.235] In-Reply-To: References: Date: Fri, 16 Oct 2015 08:09:01 -0500 X-Google-Sender-Auth: Mp0aScNgvstL4N0HqKBCBqDOc8Y Message-ID: To: Marcio Almada Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c2b930d53a0e0522387f60 Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments From: me@sammyk.me (Sammy Kaye Powers) --001a11c2b930d53a0e0522387f60 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=C3=A1rcio > Hey M=C3=A1rcio! 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. --001a11c2b930d53a0e0522387f60--