Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:86743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73282 invoked from network); 18 Jun 2015 06:25:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Jun 2015 06:25:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.178 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.160.178 mail-yk0-f178.google.com Received: from [209.85.160.178] ([209.85.160.178:36276] helo=mail-yk0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/43-46946-37462855 for ; Thu, 18 Jun 2015 02:25:56 -0400 Received: by ykdr198 with SMTP id r198so58994512ykd.3 for ; Wed, 17 Jun 2015 23:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=5N9UBMKD6N4CI0wxlaKHBTz02u8eH75pXz3FIuZV7vk=; b=O1tcbIYAHRpnJZaxMVdrB6/fTHT2e2NTMXQRxJi92cYvw4t4Kjk4h16F0RqiHsrsst zgQ1jRL28Ugk3Pe/WYAB2OziOGPsJF+wI4Qn3LWWAbyHaUVrsPCaMk0uXriVKraF27cE 9/6xBvWU4O+7GwCYMrkkBoIb1VZ3keY1KzMDTufXS9FJovDAtqH2YHud2USDYCQpVLSM sChuswN47N5Z9jE1hogNWy4PZp1vaVQBpKtIpbRLAE5QP9Ml3EoME38hnyTdAlCOt4VI /nwOvyI4siyy3n4ZA7UWkofLXVa4bjjzj804EWom35o6yZdGBX9ptJS0PSihc9iiOzKW xNXw== X-Received: by 10.170.118.86 with SMTP id k83mr11692435ykb.64.1434608753030; Wed, 17 Jun 2015 23:25:53 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.13.246.2 with HTTP; Wed, 17 Jun 2015 23:25:12 -0700 (PDT) In-Reply-To: <68262FAD-587B-47FF-B388-3B8551FDCA22@cschneid.com> References: <68262FAD-587B-47FF-B388-3B8551FDCA22@cschneid.com> Date: Thu, 18 Jun 2015 15:25:12 +0900 X-Google-Sender-Auth: KgRma12jTDl9h_QpvHKtmAb8hPo Message-ID: To: Christian Schneider Cc: PHP Development Content-Type: multipart/alternative; boundary=001a1137ccec1dbc4f0518c4e14c Subject: Re: [PHP-DEV] Revisit trailing commas in function call parameters? From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a1137ccec1dbc4f0518c4e14c Content-Type: text/plain; charset=UTF-8 Hi Christian, On Wed, Jun 17, 2015 at 9:05 PM, Christian Schneider wrote: > Hi there, > now that syntax for variadic functions was added I quickly wanted to ask > whether allowing trailing commas for function calls could be reconsidered. > > It is a very small change to the language allowing something like > my_variadic_function( > "foo", > "bar", > "qux", > ); > which makes adding/removing additional parameters a little easier: No > comma has to be added/removed from the last line. > > Previously this was considered unnecessary but maybe things changed enough > to reconsider it? It doesn't involve any BC break and I attached the very > simple patch needed in the master branch. > > If people still consider it more harm- than useful then please don't flame > me and I'll shut up again :-) > PHP allows array( 1, 2, 3, ); therefore my_variadic_function( "foo", "bar", "qux", ); is consistent behavior to me. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a1137ccec1dbc4f0518c4e14c--