On 20/09/2021 14:46, tyson andre wrote:
The choice of global namespace maintains consistency with the namespace used 
for general-purpose collections already in the SPL


I find this argument unconvincing. If the intention is for this to fit with existing classes in the SPL, it should be called "SplDeque", or more consistently "SplDoubleEndedQueue", and the RFC should talk about how the design aligns with those existing classes.

If it is intended to be the first of a new set of data structures which are *not* aligned with the existing SPL types, then putting it in a new namespace would make most sense.

In the RFC and the list you've mentioned a few comparisons, but I don't think any of them hold:

* ArrayObject, WeakReference, and WeakMap are all classes for binding to specific engine behaviour, not generic data structures * Iterators all have an "Iterator" suffix (leading to some quite awkward names)
* Reflection classes all have a "Reflection" prefix
* Having both "Queue" and "SplQueue", or both "Stack" and "SplStack" would be a terrible idea, and is a pretty strong argument *not* to add data structures with such plain names


Regards,

--
Rowan Tommins
[IMSoP]

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to