From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7502ddf2c6c41330 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeeds.sol.net!posts.news.twtelecom.net!nnrp2.twtelecom.net!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada References: <416657E2.9050503@mailinator.com> Subject: Re: Missing features in Ada.Containers Date: Fri, 8 Oct 2004 10:57:55 -0400 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: <4166a832$0$91005$39cecf19@news.twtelecom.net> Organization: Time-Warner Telecom NNTP-Posting-Date: 08 Oct 2004 14:46:10 GMT NNTP-Posting-Host: 8a3bfad9.news.twtelecom.net X-Trace: DXC=Jc1g>C7Fhg`WgV]Z^V=^]oC_A=>8kQj6mhHXa^^g6TZdQgCbG[n49ShdYZAA8S: "Alex R. Mosteo" 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.)