Hi Christian,

On Wed, Jun 17, 2015 at 9:05 PM, Christian Schneider <cschn...@cschneid.com>
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
yohg...@ohgaki.net

Reply via email to