On Sunday, 19 February 2012 at 22:55:05 UTC, bls wrote:
Hi
What's the problem to implement some very basic containers ?
And No !! Don't waste time to tell about built in Arrays and
Associative arrays, I am following D for at 5 years now..
What I definitely don't get is
queues, stacks and dequeues, and also specialized kind of
stacks/queues
don't depend on ranges. Why we don't habe them.
Everybody, using D for serious purposes, is creating home
brewed stuff.
But fuc da duc..
the whole Range collection stuff is completely undefined.
All we know right now is that Algorithms are working on
data-structures. (Pretty new, beside)
//First incarnation ..
public class Deque(T)
{
private class Node()
{
T _value;
Node _previous;
Node _next
}
}
Yep..
should be
final public class Deque(T)
{
}
We are still not there ..
struct Node()
final class Deque(T, alias allocator)
{
}
// Let's range-i-fy it ... and here we are
final class Deque(T, alias allocator) : IXXXRange|T
{
// push and pop without sense.. what is enqueue now ?
}
Shit. all I want is a generique Queue
The std.collection situation is a shame,
Bjoern
Eagerly waiting your contribution, preferably through a pull
request, to remedy this unfortunate situation.