rfc:group_use_declarations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
rfc:group_use_declarations [2015/02/13 20:30] – added clarification about functional programming and a discussion summary marcio | rfc: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: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
* Patch: https:// | * Patch: https:// | ||
Line 24: | Line 24: | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | Group use declarations are just **syntactic sugar** | + | 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, |
+ | + | ||
Question, | Question, | ||
Line 212: | Line 212: | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
- | * [[https:// | + | * [[https:// |
===== Votes ===== | ===== Votes ===== | ||
As this is a language change, this RFC requires a 2/3 majority of Yes votes (with or without trailing " | As this is a language change, this RFC requires a 2/3 majority of Yes votes (with or without trailing " | ||
- | <doodle title=" | + | <doodle title=" |
* Yes - **with** a trailing " | * Yes - **with** a trailing " | ||
* Yes - **without** a trailing " | * Yes - **without** a trailing " | ||
Line 227: | Line 227: | ||
In case you missed the discussion. This section lists the common counter points towards this RFC and how they were replied by the RFC author and supporters on mailing lists and media: | In case you missed the discussion. This section lists the common counter points towards this RFC and how they were replied by the RFC author and supporters on mailing lists and media: | ||
- | ==== My IDE already does the imports for me and folds the namespaces so I don't need this ==== | + | ==== My IDE already does the imports for me and folds the namespaces so I don't need this feature |
We should create **usable languages by design** rather than **languages only usable by tooling**. Tooling can be very important | We should create **usable languages by design** rather than **languages only usable by tooling**. Tooling can be very important |
rfc/group_use_declarations.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1