Hi Mel Dafert,

> >The proposed API switches between terms `front`, `back`, `start` and `end` 
> >in comments - is there meant to be a conceptual difference between 
> >front/start and end/back ?
> 
> On a similar note, why are the methods for getting the first/last value called
> `top()`/`bottom()`? Off the top of my head, it is hard for me to imagine 
> which side is
> the top and which side is the bottom.
> I would prefer if it was called something more intuitive, possibly 
> `first()`/`last()` in
> accordance with `array_key_first()`/`array_key_last()`.

I've changed it to first/last in https://wiki.php.net/rfc/deque

I'd forgotten about first/last when looking for existing names php used for 
methods/global functions.
The closest I'd seen was in SplDoublyLinkedList, I'd forgotten about 
https://php.net/array_key_last getting added in php 7.3
(due to it existing for keys but not values)


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

Reply via email to