rfc:simple-annotations

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
rfc:simple-annotations [2016/05/14 19:38] mindplayrfc:simple-annotations [2016/06/27 17:45] – remove provision about reserved annotations mindplay
Line 104: Line 104:
 The optional ''$filter'' argument, if given, filters the returned list of annotations as follows: The optional ''$filter'' argument, if given, filters the returned list of annotations as follows:
  
- * If one of ''string'', ''int'', ''float'', ''bool'' are given, filters annotations using ''is_*()'' +   * If one of ''string'', ''int'', ''float'', ''bool'' are given, filters annotations using ''is_int()'', ''is_string()'', etc. 
- * If a fully-qualified class-name is given, filters annotations using ''instanceof''+   * If a fully-qualified class-name is given, filters annotations using ''instanceof''
  
 If ''null'' is given (default) all annotations are returned. If ''null'' is given (default) all annotations are returned.
Line 141: 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 Scope =====+===== Out of Scope =====
  
-A future RFC might include certain system annotations containing directives for the language interpreter itself. This might include a memoization-annotation that instructs the interpreter to memoize a function result on first call, such as is [[https://docs.hhvm.com/hack/attributes/special|supported by Hack]].+It has been suggested that this RFC should reserve certain names for compiler directives, such as (for instance) the memoization-directive [[https://docs.hhvm.com/hack/attributes/special|supported by Hack]]. This proposal does not reserve any such names, because (as others pointed out during that discussion) these are not meta-data, but rather directives for the compiler, and such features ought to be supported directly by keywords or syntax rather than by magical meta-data.
  
 ===== Proposed Voting Choices ===== ===== Proposed Voting Choices =====
rfc/simple-annotations.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1