Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:88847 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 93096 invoked from network); 16 Oct 2015 01:29:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Oct 2015 01:29:01 -0000 Authentication-Results: pb1.pair.com smtp.mail=marcio.web2@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=marcio.web2@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.172 as permitted sender) X-PHP-List-Original-Sender: marcio.web2@gmail.com X-Host-Fingerprint: 209.85.160.172 mail-yk0-f172.google.com Received: from [209.85.160.172] ([209.85.160.172:34240] helo=mail-yk0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/C1-15862-CD250265 for ; Thu, 15 Oct 2015 21:29:00 -0400 Received: by ykfy204 with SMTP id y204so71990625ykf.1 for ; Thu, 15 Oct 2015 18:28:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=kNvVppJs0IZ9mmb5nE4nEmmtWodEw3sJIFfuqmbS/hM=; b=cw1SgFyPgLsMtO4D5WHmjDgd0y556ErLhpFkG91X0fuwb/ApVWwsptTVBiY77XtjbQ 6AEV3Boyk0NyGSlJ/v0SiC7fHasOG64qNC55SJ3aql0ePWOF44Fb171gE0DmyqiYoK9P Fzawsk+L4Z2NCvwhPm5Jijm8RaCZ2AFXN4mYNxBYsXUQIUMxWDvZMSCABFeojcKEaMbN hZXwNQeDxqnmc47CtFdcD4QHfuser4yVBtiqkbrZMhY7UgtY0LayxNC1deRrVh77jGW+ YA3NQU6nT028fADZM5sj/ULlgpUu8aS7TZ1UXQhO5ymfyeDfoUprZHZVOMxXZzvBVCc4 ex3g== X-Received: by 10.129.155.208 with SMTP id s199mr9791997ywg.126.1444958937894; Thu, 15 Oct 2015 18:28:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.197.195 with HTTP; Thu, 15 Oct 2015 18:28:38 -0700 (PDT) In-Reply-To: References: Date: Thu, 15 Oct 2015 22:28:38 -0300 Message-ID: To: Sammy Kaye Powers Cc: PHP Internals Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments From: marcio.web2@gmail.com (Marcio Almada) 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