rfc:list-syntax-trailing-commas
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:list-syntax-trailing-commas [2017/01/27 15:42] – Change status to voting sammyk | rfc:list-syntax-trailing-commas [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2015-11-03 (discussion); | * Date: 2015-11-03 (discussion); | ||
* Author: Sammy Kaye Powers, me@sammyk.me | * Author: Sammy Kaye Powers, me@sammyk.me | ||
- | * Status: | + | * Status: |
* First Published at: https:// | * First Published at: https:// | ||
Line 163: | Line 163: | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | Each trailing comma list syntax | + | Each trailing comma list syntax |
- | Allow trailing commas in... | + | ==== Function/ |
- | <doodle title=" | + | <code php> |
+ | // Function/ | ||
+ | fooCall( | ||
+ | $arg1, | ||
+ | $arg2, | ||
+ | $arg3, | ||
+ | ); | ||
+ | |||
+ | // Function/ | ||
+ | function something( | ||
+ | FooBarBazInterface $in, | ||
+ | FooBarBazInterface $out, | ||
+ | ) : bool { | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
- | <doodle title=" | + | ==== Grouped namepaces ==== |
+ | |||
+ | <code php> | ||
+ | <?php | ||
+ | use Foo\Bar\{ | ||
+ | Foo, | ||
+ | Bar, | ||
+ | Baz, | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
- | <doodle title=" | + | ==== Interface implementations on a class ==== |
+ | |||
+ | <code php> | ||
+ | class Foo implements | ||
+ | FooInterface, | ||
+ | BarInterface, | ||
+ | BazInterface, | ||
+ | { | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
- | <doodle title=" | + | ==== Trait implementations on a class ==== |
+ | |||
+ | <code php> | ||
+ | class Foo | ||
+ | { | ||
+ | use | ||
+ | FooTrait, | ||
+ | BarTrait, | ||
+ | BazTrait, | ||
+ | ; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
- | <doodle title=" | + | ==== Class member lists ==== |
+ | |||
+ | <code php> | ||
+ | class Foo | ||
+ | { | ||
+ | const | ||
+ | A = 1010, | ||
+ | B = 1021, | ||
+ | C = 1032, | ||
+ | D = 1043, | ||
+ | ; | ||
+ | protected | ||
+ | $a = ' | ||
+ | $b = ' | ||
+ | $c = ' | ||
+ | ; | ||
+ | private | ||
+ | $blah, | ||
+ | ; | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No | ||
</ | </ | ||
- | <doodle title="Inheriting variables from the parent scope in anonymous functions" | + | ==== Inheriting variables from the parent scope in anonymous functions ==== |
+ | |||
+ | <code php> | ||
+ | $foo = function ($bar) use ( | ||
+ | $a, | ||
+ | $b, | ||
+ | $c, | ||
+ | ) { | ||
+ | // . . . | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | <doodle title=" | ||
* Yes | * Yes | ||
* No | * No |
rfc/list-syntax-trailing-commas.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1