www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DTL container wishlist

reply "Matthew" <matthew.hat stlsoft.dot.org> writes:
[Sorry for the post onto the D forum, but I'm going to do that for a little
while
longer, until the DTL forum achieves its own momentum.]

Not that I'm promising that all suggestions will get in the first version, but
I'd like to know what containers people would like to see as part of the
standard
library.

For any suggestions that do not have direct analogues in the C++ standard
library, descriptions of/links to implementations would be helpful.

I'm not planning to put in huge amounts of esoteric containers, but there are
certainly things that are missing from the C++ standard library that are missed.

Cheers



-- 
Matthew Wilson

Contributing editor, C/C++ Users Journal
    (www.synesis.com.au/articles.html#columns)
STLSoft moderator
    (http://www.stlsoft.org)

"I can't sleep nights till I found out who hurled what ball through what
apparatus" -- Dr Niles Crane

-------------------------------------------------------------------------------
May 05 2004
next sibling parent reply J Anderson <REMOVEanderson badmama.com.au> writes:
Matthew wrote:

[Sorry for the post onto the D forum, but I'm going to do that for a little
while
longer, until the DTL forum achieves its own momentum.]

Not that I'm promising that all suggestions will get in the first version, but
I'd like to know what containers people would like to see as part of the
standard
library.

For any suggestions that do not have direct analogues in the C++ standard
library, descriptions of/links to implementations would be helpful.

I'm not planning to put in huge amounts of esoteric containers, but there are
certainly things that are missing from the C++ standard library that are missed.

Cheers
  
- Singular linked lists (this was mentioned before). -- -Anderson: http://badmama.com.au/~anderson/
May 05 2004
parent Sean Kelly <sean ffwd.cx> writes:
J Anderson wrote:
 
 - Singular linked lists (this was mentioned before).
These are already in the C++ STL as an adaptor so I assume it would be in the DTL as well. Is there a spec of what we've got so far, or something about basic design principles? Work has kept me too darn busy to play much with D but I'd be interested in seeing how things are going so far. Sean
May 05 2004
prev sibling next sibling parent reply mike parker <mike aldacron.com> writes:
Matthew wrote:

 Not that I'm promising that all suggestions will get in the first version, but
 I'd like to know what containers people would like to see as part of the
standard
 library.
I'd love to see a HashTable. In C++, it is not part of the standard and is implemented as a vendor-specific extension.
May 06 2004
parent mike parker <mike aldacron.com> writes:
mike parker wrote:
 
 I'd love to see a HashTable. In C++, it is not part of the standard and 
 is implemented as a vendor-specific extension.
Hmm. Then again, is there a use for a HashTable above and beyond what can be done with associative arrays?
May 06 2004
prev sibling next sibling parent reply Ben Hinkle <bhinkle4 juno.com> writes:
- a linked list (double)
- a red-black tree for sorted associative containers (eg, maps, set) I'm up
in the air if we need to explicitly define set,map,multiset,multimap. I'm
tempted to just have the tree and say with value type of void it is a set,
with a counter it can be a multi-set, and with a dynamic or associative
array it is a multi-map.

- some helper functions for dealing with arrays like "reserve". It is still
true that setting the length of a dynamic array to zero (or from zero) will
wipe out any reserve but it's better than nothing.

Here's a meta-question: what should go in std, what should go in etc and
what should go outside the dmd.zip distribution like on dsource?
May 05 2004
next sibling parent resistor AT nospam DOT mac DOT com <resistor_member pathlink.com> writes:
In article <c7c697$6t7$1 digitaldaemon.com>, Ben Hinkle says...
Here's a meta-question: what should go in std, what should go in etc and
what should go outside the dmd.zip distribution like on dsource?
I think we need to define more clearly what Phobos is. As I see it, D needs three different kinds of standard library, each of which is related to a different programming-mode that can be done in D: 1) Phobos - This seems to me to like a souped-up LIBC, and will be mostly used when writing D code that mimics plain C. Basically a non-OO utility library. 2) DTL - Evolution of STL, and obviously something most familiar to C++ users. Provides very flexible OO structures without blackboxing. 3) Yet To Be Made D Class Library - Hopefully something that evolves from the tasks, and provide places in the class hierarchy for 3rd party classes to attach to. I, for one, think it would actually be better, for the sake of clarity, for DTL to remain separate from Phobos. Let Phobos remain as ONE OF the three standard D libraries. Let DTL be a separate one. Thus people who just want to write C-style D won't have to waste space linking in DTL, and in the future those library. Owen
May 05 2004
prev sibling parent resistor AT nospam DOT mac DOT com <resistor_member pathlink.com> writes:
In article <c7c697$6t7$1 digitaldaemon.com>, Ben Hinkle says...
Here's a meta-question: what should go in std, what should go in etc and
what should go outside the dmd.zip distribution like on dsource?
I think we need to define more clearly what Phobos is. As I see it, D needs three different kinds of standard library, each of which is related to a different programming-mode that can be done in D: 1) Phobos - This seems to me to like a souped-up LIBC, and will be mostly used when writing D code that mimics plain C. Basically a non-OO utility library. 2) DTL - Evolution of STL, and obviously something most familiar to C++ users. Provides very flexible OO structures without blackboxing. 3) Yet To Be Made D Class Library - Hopefully something that evolves from the tasks, and provide places in the class hierarchy for 3rd party classes to attach to. I, for one, think it would actually be better, for the sake of clarity, for DTL to remain separate from Phobos. Let Phobos remain as ONE OF the three standard D libraries. Let DTL be a separate one. Thus people who just want to write C-style D won't have to waste space linking in DTL, and in the future those library. Owen
May 05 2004
prev sibling next sibling parent reply Jan Knepper <jan smartsoft.us> writes:
Matthew wrote:
 [Sorry for the post onto the D forum, but I'm going to do that for a little
while
 longer, until the DTL forum achieves its own momentum.]
Please do NOT do that. DTL will gain it's momentum as people will see in their news readers that there are new messages in the group. Besides that it takes double the resources. AFAIK cross posting as it is called is NOT allowed in the Borland forums. I would not like to go that far, but I would like to discourage it. Thanks! Jan -- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org
May 05 2004
parent "Matthew" <matthew.hat stlsoft.dot.org> writes:
Ok. Will do.

;)

"Jan Knepper" <jan smartsoft.us> wrote in message
news:c7c79t$86f$1 digitaldaemon.com...
 Matthew wrote:
 [Sorry for the post onto the D forum, but I'm going to do that for a little
while
 longer, until the DTL forum achieves its own momentum.]
Please do NOT do that. DTL will gain it's momentum as people will see in their news readers that there are new messages in the group. Besides that it takes double the resources. AFAIK cross posting as it is called is NOT allowed in the Borland forums. I would not like to go that far, but I would like to discourage it. Thanks! Jan -- ManiaC++ Jan Knepper But as for me and my household, we shall use Mozilla... www.mozilla.org
May 05 2004
prev sibling next sibling parent Lars Ivar Igesund <larsivar igesund.net> writes:
[To D NG: Thread started in D.dtl]

Ant wrote:

 of course this is my impression and Matthew is doing a bad
 job to clarify this - I might be wrong of course.
I agree that Matthew need to clarify his (and Synesis') position here. And probably Walter too. I might add to your ANT plans that anyone can make their own implementation of an API. If the API of phobos is considered standard, but with an unacceptable license, then a reimplementation (clean room) can be made and released under e.g. LGPL. The only problem is that you might not be legally entitled to call it Phobos. D Standard Library shouldn't be a problem though. When I some while ago thought about a standards group for Phobos, then such free implementations of the API was one of the (possibly not forwarded) ideas I had for it. Lars Ivar Igesund
May 07 2004
prev sibling parent "Ivan Senji" <ivan.senji public.srce.hr> writes:
"Matthew" <matthew.hat stlsoft.dot.org> wrote in message
news:c7brm0$2p25$3 digitaldaemon.com...
 [Sorry for the post onto the D forum, but I'm going to do that for a
little while
 longer, until the DTL forum achieves its own momentum.]

 Not that I'm promising that all suggestions will get in the first version,
but
 I'd like to know what containers people would like to see as part of the
standard
 library.

 For any suggestions that do not have direct analogues in the C++ standard
 library, descriptions of/links to implementations would be helpful.

 I'm not planning to put in huge amounts of esoteric containers, but there
are
 certainly things that are missing from the C++ standard library that are
missed.
 Cheers
I hope DTL will also have some algorithms like sort,find,findfirstof..., min,max templates... They are very usefull in STL.
May 07 2004