November 06, 2012 Re: dcollections | ||||
---|---|---|---|---|
| ||||
Posted in reply to deadalnix | On Tue, Nov 06, 2012 at 03:54:21PM +0100, deadalnix wrote: > Le 06/11/2012 15:10, Joseph Rushton Wakeling a écrit : [...] > >I have some potential use-cases where some of the not-in-Phobos stuff (e.g. sets) might be a good solution. It'd clearly be much nicer to be able to rely purely on the standard library instead of something outside. So, if there are some trivial things that can be done to get code transferred (e.g. if it's just a matter of time that people don't have), it'd be nice to know, in case I can do something to assist. > > > > You are not alone. You have my full psychological support. Ditto. If it can be done in Phobos, it should be in Phobos. T -- "You are a very disagreeable person." "NO." |
November 06, 2012 Re: dcollections | ||||
---|---|---|---|---|
| ||||
On Tuesday, November 06, 2012 15:10:26 Joseph Rushton Wakeling wrote:
> Hello all,
>
> Very naive question about dcollections 2.0 and std.container -- what are the reasons why dcollections has had to be developed as a standalone library, and what's in the way of incorporating that functionality into Phobos?
>
> I have some potential use-cases where some of the not-in-Phobos stuff (e.g. sets) might be a good solution. It'd clearly be much nicer to be able to rely purely on the standard library instead of something outside. So, if there are some trivial things that can be done to get code transferred (e.g. if it's just a matter of time that people don't have), it'd be nice to know, in case I can do something to assist.
There are fundamental differences in how the two work. In particular, dcollections supports the ideas of cursors, which I believe are a hybrid of sorts between iterators and ranges, while std.container only supports ranges. Andrei does not want to add cursors to std.container. Also, IIRC, dcollections does more with interfaces, whereas std.container is purely template-based (though I'm not 100% sure on that). So, the philosophies behind the two libraries are fundamentally different.
If someone wants to take containers from dcollections and port them to std.container, they're welcome to do so (that's where RedBlackTree came from), but it's not simply a matter of copying what dcollections is doing to Phobos. They're too different.
- Jonathan M Davis
|
Copyright © 1999-2021 by the D Language Foundation