Replies: 6 comments 9 replies
-
off the top of my head for me: circularBuffer - array that has no allocation, and no overflowing by trading off correctness |
Beta Was this translation helpful? Give feedback.
-
I would like to see the following containers:
Another one that I would like to see that has been more controversial is what C# calls a List type, where you can arbitrarily Add/Remove from any location. |
Beta Was this translation helpful? Give feedback.
-
If it is the case that there are no implicit allocations, it would be interesting to try to highlight Some References
|
Beta Was this translation helpful? Give feedback.
-
Why can't multidimensional arrays be created by nesting the existing import std.container.array;
import std.stdio;
void main(){
auto x = Array!(Array!uint)(Array!uint(10, 11, 12), Array!uint(20, 21, 22));
writeln(x[0][2]);
} |
Beta Was this translation helpful? Give feedback.
-
I would love to see a c++ ordered_map equivalent. |
Beta Was this translation helpful? Give feedback.
-
What value does a "Hash table" provide over an associative array? If we're passing in an allocator to the container, I think it makes sense to:
|
Beta Was this translation helpful? Give feedback.
-
Phobos v3 should have a library of generic, general-purpose containers, suitable for as many use-cases as can be reasonably supported. Most D programmers should not have to look for containers outside the standard library.
Desired Features
@safe
,@nogc
, andnothrow
code.Current Status
Phobos's current container library is the
std.container
package.It has several shortcomings:
UniquePtr!T
) impossible without introducing inconsistency.Examples In Other Languages
std::collections
moduleRelated Topics
@safe
AllocatorsBeta Was this translation helpful? Give feedback.
All reactions