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

2017-09-01 Thread Björn Larsson
Hi, Recall that it was superseded by this RFC, partly implemented in PHP 7.2: - https://wiki.php.net/rfc/list-syntax-trailing-commas In my eyes the voting result created a not quite consistent view on how trailing commas are handled in PHP in general. r//Björn Larsson Den 2017-09-01 kl. 14:16,

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

2017-09-01 Thread Dan Ackroyd
On 1 September 2017 at 13:16, Albert Casademont wrote: > Revisiting this thread. AFAIK this RFC was never put to vote, right? > It was covered in https://wiki.php.net/rfc/list-syntax-trailing-commas which was put to a vote. Although I would like see just the trailing commas in function arguments

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

2017-09-01 Thread Albert Casademont
Revisiting this thread. AFAIK this RFC was never put to vote, right? On Fri, Oct 16, 2015 at 9:01 PM, Björn Larsson wrote: > Den 2015-10-16 kl. 15:09, skrev Sammy Kaye Powers: > >> On Thu, Oct 15, 2015 at 8:28 PM, Marcio Almada >> wrote: >> >> Hi, >>> >>> 2015-10-14 16:25 GMT-03:00 Sammy Kaye P

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

2015-10-16 Thread Björn Larsson
Den 2015-10-16 kl. 15:09, skrev Sammy Kaye Powers: 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

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

2015-10-16 Thread Sammy Kaye Powers
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-

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

2015-10-15 Thread 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

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

2015-10-15 Thread Sara Golemon
On Thu, Oct 15, 2015 at 1:08 PM, Nikita Popov wrote: >> 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. > > > We allow multiple splats in o

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

2015-10-15 Thread Nikita Popov
On Thu, Oct 15, 2015 at 10:04 PM, Sara Golemon wrote: > On Thu, Oct 15, 2015 at 12:51 PM, Ryan Pallas > 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 ma

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

2015-10-15 Thread Sara Golemon
On Thu, Oct 15, 2015 at 12:51 PM, Ryan Pallas 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.

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

2015-10-15 Thread Ryan Pallas
On Thu, Oct 15, 2015 at 1:46 PM, Sara Golemon wrote: > On Thu, Oct 15, 2015 at 12:16 PM, Ryan Pallas > wrote: > > But its an entirely stylistic choice to use trailing commas for cleaner > > diffs. You could also use leading commas as well. If you made that a > coding > > standard for the organi

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

2015-10-15 Thread Ryan Pallas
On Thu, Oct 15, 2015 at 1:32 PM, Pedro Cordeiro wrote: > > Wouldn't this give the same benefit as trailing commas when it comes to > > adding removing arguments - a single line diff? > > It would. > > However, I see some merit in someone wanting trailing commas for diffs. > Leading commas would b

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

2015-10-15 Thread Sara Golemon
On Thu, Oct 15, 2015 at 12:16 PM, Ryan Pallas wrote: > But its an entirely stylistic choice to use trailing commas for cleaner > diffs. You could also use leading commas as well. If you made that a coding > standard for the organization, you would not have needed to implement > trailing am I righ

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

2015-10-15 Thread Sara Golemon
On Thu, Oct 15, 2015 at 12:32 PM, Pedro Cordeiro wrote: > I see no reason to allocate resources to make this happen, but if someone > does allocate their personal time into coding this, I wouldn't oppose a > merge. > There's a diff attached to the RFC. The actual implementation is two lines. The

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

2015-10-15 Thread Pedro Cordeiro
> Wouldn't this give the same benefit as trailing commas when it comes to > adding removing arguments - a single line diff? It would. However, I see some merit in someone wanting trailing commas for diffs. Leading commas would break away from PSRs and one should not have to choose between a stand

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

2015-10-15 Thread Ryan Pallas
On Thu, Oct 15, 2015 at 11:14 AM, Sara Golemon wrote: > On Wed, Oct 14, 2015 at 11:59 PM, Björn Larsson > wrote: > > Given the reason against this RFC in the thread it would be interesting > > to know why HHVM decided to implement it? > > > > Happy to answer, but I need to state a couple things

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

2015-10-15 Thread Björn Larsson
Den 2015-10-15 kl. 19:14, skrev Sara Golemon: On Wed, Oct 14, 2015 at 11:59 PM, Björn Larsson wrote: Given the reason against this RFC in the thread it would be interesting to know why HHVM decided to implement it? Happy to answer, but I need to state a couple things first: * I don't really c

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

2015-10-15 Thread Sara Golemon
On Wed, Oct 14, 2015 at 11:59 PM, Björn Larsson wrote: > Given the reason against this RFC in the thread it would be interesting > to know why HHVM decided to implement it? > Happy to answer, but I need to state a couple things first: * I don't really care if this change lands. I'd kinda like it

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

2015-10-15 Thread Alex Munkelwitz
Just my own opinion, but I support this idea. For most functions it may be out of place, but when dealing with variadic functions it can add consistency to code. In addition it can make for cleaner diffs when overriding or switching back to default arguments. It is nice to not need to adjust oth

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

2015-10-15 Thread Björn Larsson
Den 2015-10-14 kl. 21:25, skrev 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 Given the reason

[PHP-DEV] [RFC][DISCUSSION] Revisit trailing commas in function arguments

2015-10-14 Thread 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