GSoC-2011 project:: Containers
Fawzi Mohamed
fawzi at gmx.ch
Wed Mar 30 00:11:09 PDT 2011
I think that a doubly linked list is useful, actually it one should
implement most things so that the can work on any object that has prev
and next pointers, and give a templated default list wrapper. That is
what I did for singly linked lists, and it works well.
Often one wants to avoid allocating lot of small wrappers...
About the containers I did propose the persistent ones, because they
are useful, and currently there aren't any, whereas for more classic
dcollection is there (even if not part of phobos).
Fawzi
On 30-mar-11, at 01:55, Jonathan M Davis wrote:
> On 2011-03-29 14:50, dsimcha wrote:
>> == Quote from Jonathan M Davis (jmdavisProg at gmx.com)'s article
>>
>>> The fancier stuff would be nice, but we don't even have a doubly-
>>> linked
>>> list yet. We should get the simpler stuff sorted out before we get
>>> particularly fancy, not to mention that it's usually the simple
>>> stuff
>>> that gets heavily used.
>>
>> For the most part I agree, but a doubly linked list might be **too**
>> simple. Linked lists are so trivial to implement that I'd tend to
>> roll my
>> own that does exactly what I need with regard additional behavior on
>> insertion, etc. rather than wrapping a library solution to get these
>> features.
>
> A doubly-linked list is on the list of containers that every
> standard library
> should have or it's likely to be considered lacking. I can
> understand rolling
> your own for specific uses, but _I_ sure don't want to be doing that
> if I
> don't have to. If I want a doubly-linked list, I want to be able to
> just
> create a standard one and use it. C++, C#, and Java all have doubly-
> linked
> lists in their standard libraries.
>
> If no one else ever implements a doubly-linked list for Phobos, I'll
> probably
> do it eventually simply because it's one of the containers that is
> on the
> short list of containers that pretty much every standard library has.
>
> - Jonathan M Davis
More information about the Digitalmars-d
mailing list