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
Last revisionBoth sides next revision
rfc:class-like_primitive_types [2016/12/19 22:21] ajfrfc:class-like_primitive_types [2016/12/19 22:21] ajf
Line 169: Line 169:
 The extension of these features to the other primitive types opens up a number of future possibilities. The extension of these features to the other primitive types opens up a number of future possibilities.
  
-One of these would be [[http://nikic.github.io/2014/03/14/Methods-on-primitive-types-in-PHP.html|introducing new methods on the other primitive types]] (and also properties). This could lend string and array manipulation the convenience of method calls, and would provide an opportunity for a fresh start versus PHP's existing sstring and array functions, which have notoriously inconsistent naming and parameter orders.+One of these would be [[http://nikic.github.io/2014/03/14/Methods-on-primitive-types-in-PHP.html|introducing new methods on the other primitive types]] (and also properties). This could lend string and array manipulation the convenience of method calls, and would provide an opportunity for a fresh start versus PHP's existing string and array functions, which have notoriously inconsistent naming and parameter orders.
  
 It also means we can easily introduce new superclasses of our other primitive types. For example, a new <php>\Number</php> type superclassing <php>int</php> and <php>float</php>, or a new <php>\Scalar</php> type superclassing everything except objects and arrays. Such superclasses could potentially be extended also by user-defined classes. It also means we can easily introduce new superclasses of our other primitive types. For example, a new <php>\Number</php> type superclassing <php>int</php> and <php>float</php>, or a new <php>\Scalar</php> type superclassing everything except objects and arrays. Such superclasses could potentially be extended also by user-defined classes.
rfc/class-like_primitive_types.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1