rfc:functional-interfaces
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:functional-interfaces [2016/04/17 21:13] – krakjoe | rfc:functional-interfaces [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Functional Interfaces ====== | ====== PHP RFC: Functional Interfaces ====== | ||
* Version: 0.1 | * Version: 0.1 | ||
- | * Date: 2016-04-17 | + | * Date: 2016-04-17 |
* Author: krakjoe | * Author: krakjoe | ||
- | * Status: | + | * Status: |
* First Published at: http:// | * First Published at: http:// | ||
Line 35: | Line 35: | ||
</ | </ | ||
- | There is enough information in the code above for the compiler | + | There is enough information in the code above for the engine |
The engine generates the appropriate class entry using the closure as the only public method, having easily determined the correct name for that method (there is, and can only be, one possible candidate). | The engine generates the appropriate class entry using the closure as the only public method, having easily determined the correct name for that method (there is, and can only be, one possible candidate). | ||
Line 180: | Line 180: | ||
* supports lexical scope | * supports lexical scope | ||
- | Functional | + | Functional |
===== Receiving and Invoking Functional Interfaces ===== | ===== Receiving and Invoking Functional Interfaces ===== | ||
Line 222: | Line 222: | ||
</ | </ | ||
- | This means that the receiver (Foo:: | + | This means that the receiver (%%Foo:: |
Both methods of invocation are valid in both receiving and declaring contexts. | Both methods of invocation are valid in both receiving and declaring contexts. | ||
Line 282: | Line 282: | ||
<code php> | <code php> | ||
- | ... | + | <?php |
- | function () implements self {}; | + | new class { |
- | ... | + | |
+ | | ||
+ | } | ||
+ | }; | ||
</ | </ | ||
- | |||
- | **See 3v4l for this example, the wiki has problems displaying the code.** | ||
< | < | ||
Line 342: | Line 343: | ||
This looks as if '' | This looks as if '' | ||
+ | |||
+ | ===== Vote ===== | ||
+ | |||
+ | Voting started on May 15th, ended May 29th 2016. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 352: | Line 362: | ||
==== To Existing Extensions ==== | ==== To Existing Extensions ==== | ||
- | Extensions will be able to provide | + | The API to create functional interface |
==== To Opcache ==== | ==== To Opcache ==== | ||
Opcache may need a trivial patching. | Opcache may need a trivial patching. | ||
- | |||
- | ===== Open Issues ===== | ||
- | TBD | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
- | This sections details areas where the feature might be improved in future, but that are not currently proposed in this RFC. | + | When the concept of functional interfaces is implemented, |
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
Line 375: | Line 382: | ||
===== References ===== | ===== References ===== | ||
- | Links to external references, discussions or RFCs | + | |
+ | [[http:// |
rfc/functional-interfaces.1460927586.txt.gz · Last modified: 2017/09/22 13:28 (external edit)