Re: [RFC][DISCUSSION] Revisit trailing commas in function arguments

From: Date: Thu, 15 Oct 2015 20:04:51 +0000
Subject: Re: [RFC][DISCUSSION] Revisit trailing commas in function arguments
References: 1 2 3 4 5 6  Groups: php.internals 
Request: Send a blank email to internals+get-88838@lists.php.net to get a copy of this message
On Thu, Oct 15, 2015 at 12:51 PM, Ryan Pallas <derokorian@gmail.com> wrote: > I do h ave one question I just thought of though... how does the allowance > of trailing comma work with the splat operator (...)? I'm assuming a > function call/definition may only have one or the other, is that correct? > Excellent question. The patch on Sammy's RFC was written in Feb 2013, before variadics, so it doesn't take them into account. I would say that it should be modified to disallow a trailing comma following either a variadic declaration or a splat invocation, since the grammar around these two things prohibits followups anyway. -Sara

« previous php.internals (#88838) next »