rfc:class-like_primitive_types

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
rfc:class-like_primitive_types [2016/12/19 22:00] ajfrfc:class-like_primitive_types [2016/12/19 22:01] ajf
Line 117: Line 117:
  
 ===== Backward Incompatible Changes ===== ===== Backward Incompatible Changes =====
- 
-In order to support the <php>instanceof resource</php> syntax, <php>resource</php> must be added to the list of reserved names that cannot be used by classes, interfaces or traits. Otherwise, there would be an ambiguity as to whether this referred to a hypothetical class with the same name, or to the type. This backwards-compatibility break could be avoided by removing support for the resource type (see the Open Issues section). 
  
 **FIXME**  **FIXME** 
Line 160: Line 158:
  
 Resource is a legacy type that could be wholly replaced by objects in future. Extending these features to this type would be further entrenching it and contrary to the goal of its eventual removal. Resource is a legacy type that could be wholly replaced by objects in future. Extending these features to this type would be further entrenching it and contrary to the goal of its eventual removal.
- 
-Beyond that, supporting <php>instanceof resource</php> would require adding ''resource'' to the list of reserved class names (the other types are already on it), and therefore entail a backwards-compatibility break. Omitting support for resources would avoid this backwards-compatibility break. 
  
 ===== Unaffected PHP Functionality ===== ===== Unaffected PHP Functionality =====
rfc/class-like_primitive_types.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1