comp.lang.ada
 help / color / mirror / Atom feed
From: Bryan <brobinson.eng@gmail.com>
Subject: Generic Containers in Ada2005
Date: Tue, 8 Feb 2011 16:43:49 -0800 (PST)
Date: 2011-02-08T16:43:49-08:00	[thread overview]
Message-ID: <d066a30c-b356-4b28-b713-764c2b895022@d17g2000vbn.googlegroups.com> (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?




             reply	other threads:[~2011-02-09  0:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09  0:43 Bryan [this message]
2011-02-09  0:57 ` Generic Containers in Ada2005 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
replies disabled

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