GSoC-2011 project:: Containers

Ishan Thilina ishanthilina at gmail.com
Mon Mar 28 22:45:02 PDT 2011


Lutger Blijdestijn wrote:

>Slightly, D ranges use the same basic principles as the STL so any
>documentation on that can be used to understand the big picture.
>
>You'll see that no container implements all of std.algorithm, in fact
>containers have a very small interface. Normally algorithms work with
>different kinds of ranges and containers can  provide one or more ranges,
>thus achieving very loose coupling and reuse. If a container provides a
>certain range then *all* algorithms which operate on that kind of range will
>work with the container. For example, any container that can be accessed
>with a random access range can be used by std.sort.
>
>However, containers usually have more to offer than what can be expressed by
>ranges. std.container documents a large set of methods that particular
>containers can implement as they see fit, as a convention. These methods are
>usually specific to a particular container implementation and necessary to
>use a container or take advantage of it's specific properties.

Now I get the idea.Algorithms can work on the ranges that are supplied by the
container and provide a useful output( if that range is supported by the algorithm
of course).Thank you for sorting things out :).

Steven Schveighoffe wrote:

>If you compare RBNode in std.container and RBNode in dcollections, you'll
>find them virtually identical (little cleanup here and there).

Sure they seem to be identical :).

>I think Deque would be a good one, even though it's implementation is not
separate (the
>implementation is based on builtin arrays), so the port would be more
>involved.  You could also take the Link implementation (dual-linked list),
>but that is simple enough to write from scratch ;)

I think I am capable of implementing a Deque and a dual-linked list in D.

>If you have any questions, do not hesitate to email me at this address.  I
>would be a mentor for this.

Thank you. I do have lot's questions regarding this project.As I'm pretty much new
to D I'm am not still 100% comfortable with the language. But I'm truly happy
about the improvement that I have had in this little time.

I'm glad that you are willing to be a mentor for this project. I'll try my best to
come up with a solid project proposal :)


More information about the Digitalmars-d mailing list