rfc:arrayof
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:arrayof [2014/02/27 21:00] – philstu | rfc:arrayof [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Array Of ====== | ====== PHP RFC: Array Of ====== | ||
- | * Version: 0.1.2 | + | * Version: 0.2.0 |
* Date: 2014-01-15 | * Date: 2014-01-15 | ||
* Author: Joe Watkins, krakjoe@php.net & Phil Sturgeon philstu@php.net | * Author: Joe Watkins, krakjoe@php.net & Phil Sturgeon philstu@php.net | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 122: | Line 122: | ||
This also does not attempt to allow Traversable or other objects implementing interfaces to be considered an " | This also does not attempt to allow Traversable or other objects implementing interfaces to be considered an " | ||
- | ===== Open Questions ===== | + | ===== Closed |
+ | |||
+ | 1. Should multi-dimensional hints be allowed? | ||
+ | |||
+ | <code php> | ||
+ | function test(Foo[][] $files = null) {} | ||
+ | </ | ||
+ | |||
+ | The general consensus seemed to be that instead of using " | ||
+ | |||
+ | |||
+ | 2. RFC suggested syntax, or Hack Generics syntax? | ||
+ | |||
+ | With this features close proximity to the " | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Java has both features, with their own syntax. This means there is no reason for us to hold off implementing with the existing syntax and looking into adding generics as well, at a later date. | ||
+ | |||
+ | If people want to change the syntax of this feature more in line with Hack generics syntax then simply vote no, and we can revisit the issue. | ||
- | 1. The RFC is currently // | + | 3. The RFC is currently // |
<code php> | <code php> | ||
Line 148: | Line 167: | ||
Logic here would dictate that if you ask for a bag of spanners, you get a bag of spanners, not a bag with a few spanners and maybe a few "I owe you one spanner" | Logic here would dictate that if you ask for a bag of spanners, you get a bag of spanners, not a bag with a few spanners and maybe a few "I owe you one spanner" | ||
- | ===== Closed Questions ===== | + | Multiple people suggested |
- | + | ||
- | 1. Should multi-dimensional hints be allowed? | + | |
- | + | ||
- | <code php> | + | |
- | function test(Foo[][] $files = null) {} | + | |
- | </ | + | |
- | + | ||
- | The general consensus seemed to be that instead of using " | + | |
- | + | ||
- | + | ||
- | 2. RFC suggested syntax, or Hack Generics syntax? | + | |
- | + | ||
- | With this features close proximity to the " | + | |
- | + | ||
- | http:// | + | |
- | + | ||
- | Java has both features, with their own syntax. This means there is no reason for us to hold off implementing with the existing syntax and looking into adding generics as well, at a later date. | + | |
- | + | ||
- | If people want to change the syntax of this feature more in line with Hack generics syntax then simply vote no, and we can revisit the issue. | + | |
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 177: | Line 176: | ||
PHP 5.6 | PHP 5.6 | ||
+ | |||
+ | ===== Vote ===== | ||
+ | |||
+ | VOTE: 2014/02/28 - 2014/03/07 | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
===== Implementation ===== | ===== Implementation ===== | ||
Line 190: | Line 199: | ||
===== References ===== | ===== References ===== | ||
+ | [[http:// | ||
+ | [[http:// |
rfc/arrayof.1393534856.txt.gz · Last modified: 2017/09/22 13:28 (external edit)