GSoC-2011 project:: Containers
Steven Schveighoffer
schveiguy at yahoo.com
Fri Apr 1 12:13:22 PDT 2011
On Fri, 01 Apr 2011 14:44:36 -0400, Ishan Thilina <ishanthilina at gmail.com>
wrote:
>
> Also I tried to implement a Queue(which is not available in
> DCollections) using my
> novice D knowledge. But I get two compiler errors when using it. Can
> some help me
> to sort out the mess?
> The std.container file is attached with this ,at the end of the file
> you'll find
> the code that I added.
The file you attached does not work, gzip says the file end prematurely.
FYI, I did not implement Queue (or Stack) because it is a simple adapter
on List. I made an executive decision to avoid adapter classes because I
feel they add little value. This does not mean you shouldn't implement
it, but I think it belongs more in the higher level types (like map, set,
etc) and have it use an implementation container as it's base. Andrei?
-Steve
More information about the Digitalmars-d
mailing list