rfc:spl-improvements
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:spl-improvements [2012/01/08 06:01] – [What is wrong with the SPL?] levim | rfc:spl-improvements [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 31: | Line 31: | ||
* Accessing an invalid index type should give a message similar to " | * Accessing an invalid index type should give a message similar to " | ||
* Accessing an out-of-bounds index should give a message similar to "Index ' | * Accessing an out-of-bounds index should give a message similar to "Index ' | ||
- | * **[[http:// | ||
The problems that cannot be fixed without breaking backwards compatibility should be carefully discussed and examined. | The problems that cannot be fixed without breaking backwards compatibility should be carefully discussed and examined. | ||
Line 37: | Line 36: | ||
Some problems that need to be talked about and resolved: | Some problems that need to be talked about and resolved: | ||
* **Exceptions** | * **Exceptions** | ||
- | * Each extension | + | * Each exception |
* All of the SPL classes should be refactored to align their behavior with the exception clarifications. | * All of the SPL classes should be refactored to align their behavior with the exception clarifications. | ||
- | * **APIs of SplStack and SplQueue.** They should not publicly inherit from SplDoublyLinkedList. | ||
* **Should the SPL be namespaced? | * **Should the SPL be namespaced? | ||
* If large-scale backwards compatibility is broken, it could be detrimental to do so all at once. However, doing it in pieces is not really reasonable. Namespacing the SPL while keeping the old SPL in place could allow all of the changes to happen without breaking backwards compatibility because the current SPL is not namespaced. | * If large-scale backwards compatibility is broken, it could be detrimental to do so all at once. However, doing it in pieces is not really reasonable. Namespacing the SPL while keeping the old SPL in place could allow all of the changes to happen without breaking backwards compatibility because the current SPL is not namespaced. | ||
* This could be the beginning of migrating existing PHP extensions and functions to namespaces. If this works well, then there is a viable way to safely break backwards compatibility and could be used in many other areas where breaking backwards compatibility is undesirable. | * This could be the beginning of migrating existing PHP extensions and functions to namespaces. If this works well, then there is a viable way to safely break backwards compatibility and could be used in many other areas where breaking backwards compatibility is undesirable. |
rfc/spl-improvements.1326002505.txt.gz · Last modified: 2017/09/22 13:28 (external edit)