rfc:prototype_checks
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:prototype_checks [2011/09/19 11:52] – [Clarify the constructor problem] colder | rfc:prototype_checks [2014/04/08 22:52] – Inactive levim | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Request for Comments: | + | ====== Request for Comments: |
* Version: 1.0 | * Version: 1.0 | ||
* Date: 2011-09-19 | * Date: 2011-09-19 | ||
* Author: Etienne Kneuss < | * Author: Etienne Kneuss < | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 142: | Line 142: | ||
Constructors can be seen as pseudo-static methods, for this reason, the same checks for normal methods do not always apply for constructors. | Constructors can be seen as pseudo-static methods, for this reason, the same checks for normal methods do not always apply for constructors. | ||
- | It is however unclear whether we really want, for constructors, | + | It is however unclear whether we really want, for constructors, |
- Do we really want that check to be performed on 5.4 for constructors coming from abstract methods | - Do we really want that check to be performed on 5.4 for constructors coming from abstract methods | ||
Line 148: | Line 148: | ||
+ | ==== Similar prototypes from different interfaces ==== | ||
+ | It would be better to allow multiple interfaces to define the same intersection of prototype. It is currently not allowed in any case. | ||
+ | For example: | ||
+ | |||
+ | interface A { | ||
+ | function apply($a, $b); | ||
+ | // ... | ||
+ | } | ||
+ | | ||
+ | interface B { | ||
+ | | ||
+ | // ... | ||
+ | } | ||
+ | | ||
+ | class C implements A, B { .. } | ||
+ | |||
+ | This is currently not allowed, but there is no reason why it shouldn' |
rfc/prototype_checks.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1