comp.lang.ada
 help / color / mirror / Atom feed
* Generic Containers in Ada2005
@ 2011-02-09  0:43 Bryan
  2011-02-09  0:57 ` Jeffrey Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Bryan @ 2011-02-09  0:43 UTC (permalink / raw)


I'm been writing a small Ada program for a personal project.  I
usually write C++/STL for such projects due to my background, but
because I wanted to get more practice with Ada, I decided to do the
project with Ada.  All has been well, except that I've been a bit
surprised about generic containers.

I was looking for a simple queue data structure, but I noticed there
is not a standard Queue container.  I managed to make a Vector work
like a Queue, but it feels a bit awkward:  Append() for a "push" and
First_Element()+Delete_First() for a "pop".  I realize that I can
write a wrapper interface and create my own queue, but queues are so
common I can't believe we have Hashed_Maps and not a simple Queue
container.

I'm just curious what the reasoning was behind not providing a Queue
container?  Is there some Ada philosophy behind this?  Or is there
something similar to the C++ Standard Template Library in Ada?




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-02-11  7:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-09  0:43 Generic Containers in Ada2005 Bryan
2011-02-09  0:57 ` Jeffrey Carter
2011-02-09  1:26   ` Anh Vo
2011-02-09 10:56     ` Simon Wright
2011-02-09  8:33 ` Dmitry A. Kazakov
2011-02-09 16:01   ` Bryan
2011-02-09 19:10     ` Jeffrey Carter
2011-02-09 20:06     ` Simon Wright
2011-02-09 20:56   ` Maciej Sobczak
2011-02-09 21:22     ` Dmitry A. Kazakov
2011-02-10  2:03 ` Randy Brukardt
2011-02-11  7:08   ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox