rfc:simple-annotations
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:simple-annotations [2016/05/13 11:15] – mindplay | rfc:simple-annotations [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Simple Annotations ====== | ====== PHP RFC: Simple Annotations ====== | ||
- | * Version: 0.1 | + | * Version: 0.3 |
* Date: 2016-05-13 | * Date: 2016-05-13 | ||
* Author: Rasmus Schultz, rasmus@mindplay.dk | * Author: Rasmus Schultz, rasmus@mindplay.dk | ||
Line 83: | Line 83: | ||
==== Annotations are Context-free ==== | ==== Annotations are Context-free ==== | ||
- | By design, there is no access to variables in the parent class, file or global scope, no '' | + | By design, |
Annotations work consistently regardless of which source element they are applied to, and may be evaluated without first creating an object instance. | Annotations work consistently regardless of which source element they are applied to, and may be evaluated without first creating an object instance. | ||
- | |||
- | You can think of an annotation ''<< | ||
- | |||
- | function () { return expression(); | ||
Annotations that do require context should explicitly ask for that context - for example, you could use an anonymous function, a '' | Annotations that do require context should explicitly ask for that context - for example, you could use an anonymous function, a '' | ||
Line 108: | Line 104: | ||
The optional '' | The optional '' | ||
- | * If one of '' | + | * If one of '' |
- | * If a fully-qualified class-name is given, filters annotations using '' | + | |
If '' | If '' | ||
Line 145: | Line 141: | ||
Annotations are a new feature - it does not affect any existing functionality. | Annotations are a new feature - it does not affect any existing functionality. | ||
- | ===== Future | + | ===== Out of Scope ===== |
- | TODO file-level annotations? | + | It has been suggested that this RFC should reserve certain names for compiler directives, such as (for instance) the memoization-directive [[https:// |
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== |
rfc/simple-annotations.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1