comp.lang.ada
 help / color / mirror / Atom feed
From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Missing features in Ada.Containers
Date: Fri, 8 Oct 2004 10:57:55 -0400
Date: 2004-10-08T14:46:10+00:00	[thread overview]
Message-ID: <4166a832$0$91005$39cecf19@news.twtelecom.net> (raw)
In-Reply-To: 416657E2.9050503@mailinator.com


"Alex R. Mosteo" <devnull@mailinator.com> wrote in message
news:416657E2.9050503@mailinator.com...
>
> Of the top of my head I find notable the absence of the "hashed strings"
> container. Now it seems you're alone with a "hashed map" whose keys are
> generic of constrained nature. Thus you must make some leaps to have the
> old (and in my case, most used) hashed string container. Indeed it
> requires ugly conversions between the key type, String, defining the
> hashing function simply to reuse the Ada.Hash_String, etc. It smells so
> wrong to me that I'm almost sure I'm missing something obvious here.

The container ada.containers.indefinite_hashed_maps allows both the key and
element types to be indefinite.  All you need to do is instantiate the
indefinite_hashed_maps with type String as the generic actual key type, and
all will be well.


> Another bizarre (I suppose it was discussed in the mettings) novelty
> (but really of minor relevance as I see it) is that the "sorted maps"
> functionality is now a child package of the "sorted sets". Not only this
> requires now two instantiations to get a "sorted map" but it imposes the
> use of a "sorted set" even if you don't want one?

We made a tentative agreement to add both ordered_maps and hashed_sets to
the API.

I suggest you post a note on the ada-comment list to let the ARG know that
you want these containers.


> I know these comments, accurate or not, come too late... but I've just
> started to use these new containers and even if I did read the past
> discussions about the AI.302, I didn't know the specifics.

See the a-c*.ad[sb] files at the http://charles.tigris.org/.

(Don't confuse the a-c*.ad[sb] files with the ai302.containers.* files.
Only the a-c* files are up-to-date.)






      parent reply	other threads:[~2004-10-08 14:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08  9:03 Missing features in Ada.Containers Alex R. Mosteo
2004-10-08  9:49 ` Martin Dowie
2004-10-08 12:45   ` Alex R. Mosteo
2004-10-08 15:04     ` Martin Dowie
2004-10-08 10:07 ` Martin Dowie
2004-10-08 12:43   ` Alex R. Mosteo
2004-10-08 14:57 ` Matthew Heaney [this message]
replies disabled

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