Containers I'd like to see in std.containers

Simen kjaeraas simen.kjaras at
Sun May 30 15:32:44 PDT 2010

Rainer Deyke <rainerd at> wrote:

> Any container that supports pushing and popping on one end can be used
> as a stack.  Any container that supports pushing on one end and popping
> on the other can be used as a queue.  I don't think either of these need
> their own container type.

There are other concerns than simply what works. First of all is
readability - having containers called queue and stack makes code easier
to understand, even if this is done with a simple alias.
There might also be a concern about efficiency, as there is a difference
in how fast different containers can push and pop.


More information about the Digitalmars-d mailing list