rfc:group_use_declarations

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:group_use_declarations [2015/02/14 01:18] – missing word marciorfc:group_use_declarations [2015/03/08 18:19] nikic
Line 3: Line 3:
   * Date: 2015-01-28   * Date: 2015-01-28
   * Author: Márcio Almada, marcio.web2@gmail.com   * Author: Márcio Almada, marcio.web2@gmail.com
-  * Status: Voting (previously Under Discussion)+  * Status: Implemented (in PHP 7.0)
   * First Published at: http://wiki.php.net/rfc/group_use_declarations   * First Published at: http://wiki.php.net/rfc/group_use_declarations
   * Patch: https://github.com/php/php-src/pull/1005   * Patch: https://github.com/php/php-src/pull/1005
Line 24: Line 24:
  
 ===== Proposal ===== ===== Proposal =====
-Group use declarations are just **syntactic sugar** to cut verbosity when importing multiple entities from a common namespace. Using common PHP library examples, the following use declarations are equivalents:+Group use declarations are used to cut verbosity when importing multiple entities from a common namespace. Using common PHP library examples, the following use declarations are equivalents:
  
 <code php> <code php>
Line 125: Line 125:
 use Symfony\Component\Console\Question\{ use Symfony\Component\Console\Question\{
     ConfirmationQuestion,     ConfirmationQuestion,
-    ChoiceQuestion as Choice;+    ChoiceQuestion as Choice,
 +   OptionQuestion, +   OptionQuestion,
     Question,     Question,
Line 212: Line 212:
   * [[http://www.rust-lang.org|Rust Language]] has a very similar syntax ''use a::b::{c, d, e, f};''   * [[http://www.rust-lang.org|Rust Language]] has a very similar syntax ''use a::b::{c, d, e, f};''
   * [[http://www.scala-lang.org/old/node/119|Scala]] has a very similar syntax ''use a.b.{c, d, e, f};''   * [[http://www.scala-lang.org/old/node/119|Scala]] has a very similar syntax ''use a.b.{c, d, e, f};''
-  * [[https://www.python.org|Pyhon]] has a different syntax but with the same objective: ''from fibo import fib, fib2, fib3''+  * [[https://www.python.org|Python]] has a different syntax but with the same objective: ''from fibo import fib, fib2, fib3''
  
 ===== Votes ===== ===== Votes =====
 As this is a language change, this RFC requires a 2/3 majority of Yes votes (with or without trailing "\") to pass. Voting started on 2015-02-11 and will end on 2015-02-25. As this is a language change, this RFC requires a 2/3 majority of Yes votes (with or without trailing "\") to pass. Voting started on 2015-02-11 and will end on 2015-02-25.
  
-<doodle title="Should Grouped Use Declarations be added to PHP 7" auth="marcio" voteType="single" closed="false">+<doodle title="Should Grouped Use Declarations be added to PHP 7" auth="marcio" voteType="single" closed="true">
    * Yes - **with** a trailing "\"    * Yes - **with** a trailing "\"
    * Yes - **without** a trailing "\"    * Yes - **without** a trailing "\"
rfc/group_use_declarations.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1