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

This is only part of a thread. view whole thread
  88847
October 16, 2015 01:28 marcio.web2@gmail.com (Marcio Almada)
Hi,

2015-10-14 16:25 GMT-03:00 Sammy Kaye Powers <me@sammyk.me>:
> 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árcio
  88855
October 16, 2015 13:09 me@sammyk.me (Sammy Kaye Powers)
On Thu, Oct 15, 2015 at 8:28 PM, Marcio Almada web2@gmail.com>
wrote:

> Hi, > > 2015-10-14 16:25 GMT-03:00 Sammy Kaye Powers <me@sammyk.me>: > > 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árcio >
Hey Márcio! Thanks for the suggesting "trailing comma all the things" idea. I can certainly get behind that idea and I think it would offer an even stronger argument than just trailing commas on function args. I'm curious what others think about broadening the scope of the RFC to include all the list grammars in PHP.
  88859
October 16, 2015 19:01 bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=)
Den 2015-10-16 kl. 15:09, skrev Sammy Kaye Powers:
> On Thu, Oct 15, 2015 at 8:28 PM, Marcio Almada web2@gmail.com> > wrote: > >> Hi, >> >> 2015-10-14 16:25 GMT-03:00 Sammy Kaye Powers <me@sammyk.me>: >>> 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árcio >> > Hey Márcio! > > Thanks for the suggesting "trailing comma all the things" idea. I can > certainly get behind that idea and I think it would offer an even stronger > argument than just trailing commas on function args. > > I'm curious what others think about broadening the scope of the RFC to > include all the list grammars in PHP. > Well, if there is a wish to broaden the scope maybe the voting
should be split on each case? Like the remove depr. func. RFC: https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 r//Björn
  100340
September 1, 2017 12:16 albertcasademont@gmail.com (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 larsson@telia.com>
wrote:

> Den 2015-10-16 kl. 15:09, skrev Sammy Kaye Powers: > >> On Thu, Oct 15, 2015 at 8:28 PM, Marcio Almada web2@gmail.com> >> wrote: >> >> Hi, >>> >>> 2015-10-14 16:25 GMT-03:00 Sammy Kaye Powers <me@sammyk.me>: >>> >>>> 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árcio >>> >>> Hey Márcio! >> >> Thanks for the suggesting "trailing comma all the things" idea. I can >> certainly get behind that idea and I think it would offer an even stronger >> argument than just trailing commas on function args. >> >> I'm curious what others think about broadening the scope of the RFC to >> include all the list grammars in PHP. >> >> Well, if there is a wish to broaden the scope maybe the voting > should be split on each case? Like the remove depr. func. RFC: > https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 > > r//Björn > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >
  100341
September 1, 2017 12:42 danack@basereality.com (Dan Ackroyd)
On 1 September 2017 at 13:16, Albert Casademont
<albertcasademont@gmail.com> 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 be brought up for discussion again, without any of the other distracting stuff - like trailing commas in function declarations - it probably would be better to wait, to avoid people being annoyed by the same RFC being brought up too soon. cheers Dan
  100345
September 1, 2017 15:13 bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_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, skrev 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 > larsson@telia.com <mailto:bjorn.x.larsson@telia.com>> wrote: > > Den 2015-10-16 kl. 15:09, skrev Sammy Kaye Powers: > > On Thu, Oct 15, 2015 at 8:28 PM, Marcio Almada > web2@gmail.com <mailto:marcio.web2@gmail.com>> > wrote: > > Hi, > > 2015-10-14 16:25 GMT-03:00 Sammy Kaye Powers <me@sammyk.me > <mailto:me@sammyk.me>>: > > 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 > <https://wiki.php.net/rfc/revisit-trailing-comma-function-args> > > Discuss! :) > > Thanks, > Sammy Kaye Powers > sammyk.me <http://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 > <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árcio > > Hey Márcio! > > Thanks for the suggesting "trailing comma all the things" > idea.  I can > certainly get behind that idea and I think it would offer an > even stronger > argument than just trailing commas on function args. > > I'm curious what others think about broadening the scope of > the RFC to > include all the list grammars in PHP. > > Well, if there is a wish to broaden the scope maybe the voting > should be split on each case? Like the remove depr. func. RFC: > https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7 > <https://wiki.php.net/rfc/remove_deprecated_functionality_in_php7> > > r//Björn > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >