Containers I'd like to see in std.containers
SeeWebsiteForEmail at erdani.org
Sun May 30 17:41:37 PDT 2010
On 05/30/2010 07:10 PM, Ellery Newcomer wrote:
> On 05/30/2010 06:25 PM, Jonathan M Davis wrote:
>> Philippe Sigaud wrote:
>>> There are some simple containers I'd like to see in std.containers:
>>> - a priority queue
>>> - a heap
>>> - a stack, a queue
>>> - a set
>>> Do people here also consider them as containers and useful ones in a
>>> standard library?
>> A sorted map in addition to a hash map would be good, and for a set,
>> both a
>> sorted and a hash variety woud be good. And of course, multisets and
>> multimaps would be useful too. We also lack a doubly-linked list.
> Maybe an ordered map, i.e. keeps track of order of insertion? I think I
> saw this in python once. Looked handy.
I'm thinking of a slightly different course for std.container. Instead
of defining an OrderedMap structure that doesn't specify its
implementation, std.container will define _explicit_ consecrated data
structures, such as BinaryTree and RedBlackTree (Steve Schveighoffer
graciously contributed his R-B tree implementation). Later on, we might
define a set of generic aliases for typical container choices, but I
want std.container to actually reflect the interesting personalities and
tradeoffs that data structures have.
More information about the Digitalmars-d