rfc:reserve_primitives
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:reserve_primitives [2015/02/08 11:50] – thekid | rfc:reserve_primitives [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== PHP RFC: Reserving primitive types ==== | + | ====== PHP RFC: Reserving primitive types ====== |
* Version: 0.9 | * Version: 0.9 | ||
* Date: 2015-02-08 | * Date: 2015-02-08 | ||
Line 9: | Line 9: | ||
===== Introduction ===== | ===== Introduction ===== | ||
- | Reserving the names as suggested e.g. by the [[https:// | + | Reserving the names as suggested e.g. by the [[https:// |
===== Proposal ===== | ===== Proposal ===== | ||
Line 86: | Line 86: | ||
To the reader, it's *probably* clear because of the uppercasing. If a lowercase class was used, this would be confusing. Looking at real-life frameworks and libraries, we'd usually find the first case. | To the reader, it's *probably* clear because of the uppercasing. If a lowercase class was used, this would be confusing. Looking at real-life frameworks and libraries, we'd usually find the first case. | ||
- | ==== Option 4: Case insensitivity ==== | + | ==== Option 4: Case insensitivity |
This option would add special handling to the primitive types names and allow all situations in which a different casing was used. | This option would add special handling to the primitive types names and allow all situations in which a different casing was used. | ||
Line 110: | Line 110: | ||
</ | </ | ||
- | Fair enough, this is counter-intuitive to all other types. | + | Fair enough, this is counter-intuitive to the syntax used so far for arrays and callables as well as for value types; and the majority of other programming languages. |
==== Option 6: Do not reserve ==== | ==== Option 6: Do not reserve ==== | ||
Line 120: | Line 120: | ||
===== RFC Impact ===== | ===== RFC Impact ===== | ||
In all situations except the last two options, reserving primitive type names causes a BC break. The options above sketch out how we can cope with this, balancing the usefulness of being able to use these tokens and backwards compatibility on the other side. | In all situations except the last two options, reserving primitive type names causes a BC break. The options above sketch out how we can cope with this, balancing the usefulness of being able to use these tokens and backwards compatibility on the other side. | ||
+ | |||
+ | These frameworks would be affected by reserving the word " | ||
+ | |||
+ | * CakePHP - '' | ||
+ | * Joomla - '' | ||
+ | * ZF2 - '' | ||
+ | * Drupal8 - '' | ||
+ | * XP Framework - '' | ||
+ | |||
+ | This [[https:// | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
Line 134: | Line 144: | ||
===== References ===== | ===== References ===== | ||
- | https:// | + | * https:// |
+ | * https:// | ||
===== Rejected Features ===== | ===== Rejected Features ===== | ||
(TODO) | (TODO) |
rfc/reserve_primitives.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1