rfc:list-syntax-trailing-commas

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
rfc:list-syntax-trailing-commas [2017/01/27 15:51] – Added example above each vote option sammykrfc:list-syntax-trailing-commas [2017/05/01 10:22] nikic
Line 3: Line 3:
   * Date: 2015-11-03 (discussion); 2017-01-27 (voting)   * Date: 2015-11-03 (discussion); 2017-01-27 (voting)
   * Author: Sammy Kaye Powers, me@sammyk.me   * Author: Sammy Kaye Powers, me@sammyk.me
-  * Status: Voting+  * Status: Implemented in PHP 7.2 (Grouped namepaces only)
   * First Published at: https://wiki.php.net/rfc/revisit-trailing-comma-function-args, https://wiki.php.net/rfc/trailing-comma-function-args   * First Published at: https://wiki.php.net/rfc/revisit-trailing-comma-function-args, https://wiki.php.net/rfc/trailing-comma-function-args
  
Line 163: Line 163:
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
  
-Each trailing comma list syntax would get its own vote and would require a 2/3 majority to pass.+Each trailing comma list syntax has its own vote and requires a 2/3 majority to pass.
  
  
Line 170: Line 170:
 <code php> <code php>
 // Function/method arguments (call) // Function/method arguments (call)
-fooCall($arg1, $arg2, $arg3,);+fooCall( 
 +    $arg1, 
 +    $arg2, 
 +    $arg3, 
 +);
          
 // Function/method arguments (declaration) // Function/method arguments (declaration)
-function something(FooBarBazInterface $in, FooBarBazInterface $out,) : bool +function something( 
-{+    FooBarBazInterface $in, 
 +    FooBarBazInterface $out, 
 +) : bool {
 } }
 </code> </code>
  
-<doodle title="Allow trailing commas in function/method arguments (declarations calls)" auth="SammyK" voteType="single">+<doodle title="Allow trailing commas in function/method arguments (declarations and calls)" auth="SammyK" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 194: Line 200:
 </code> </code>
  
-<doodle title="Allow trailing commas in grouped namepaces" auth="SammyK" voteType="single">+<doodle title="Allow trailing commas in grouped namepaces" auth="SammyK" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 210: Line 216:
 </code> </code>
  
-<doodle title="Allow trailing commas in interface implementations on a class" auth="SammyK" voteType="single">+<doodle title="Allow trailing commas in interface implementations on a class" auth="SammyK" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 218: Line 224:
  
 <code php> <code php>
-// Function/method arguments (call) 
-fooCall($arg1, $arg2, $arg3,); 
- 
 class Foo class Foo
 { {
Line 231: Line 234:
 </code> </code>
  
-<doodle title="Allow trailing commas in trait implementations on a class" auth="SammyK" voteType="single">+<doodle title="Allow trailing commas in trait implementations on a class" auth="SammyK" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 258: Line 261:
 </code> </code>
  
-<doodle title="Allow trailing commas in class member lists" auth="SammyK" voteType="single">+<doodle title="Allow trailing commas in class member lists" auth="SammyK" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
Line 275: Line 278:
 </code> </code>
  
-<doodle title="Allow trailing commas in anonymous functions' 'uselists" auth="SammyK" voteType="single">+<doodle title="Allow trailing commas in use lists for anonymous functions" auth="SammyK" voteType="single" closed="true">
    * Yes    * Yes
    * No    * No
rfc/list-syntax-trailing-commas.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1