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,a3736685ef876ab2 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!out02a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!in03.usenetserver.com!news.usenetserver.com!news.glorb.com!sn-xt-sjc-05!sn-xt-sjc-08!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail From: Matthew Heaney Newsgroups: comp.lang.ada Subject: Re: OO Style with Ada Containers Date: Mon, 19 Nov 2007 02:47:09 +0000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <1195082906.420079.195000@d55g2000hsg.googlegroups.com> <1195084214.480299.13970@t8g2000prg.googlegroups.com> <1195084752.840598.174460@v65g2000hsc.googlegroups.com> <1195086265.070953.93180@d55g2000hsg.googlegroups.com> <87oddv3l55.fsf@ludovic-brenta.org> <4e65cf83-b296-497f-848e-59d543c19a46@v4g2000hsf.googlegroups.com> <87abpf3fno.fsf@ludovic-brenta.org> <63fc95f4-1245-46e3-8c4b-7eabdd57fd91@c29g2000hsa.googlegroups.com> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (windows-nt) Cancel-Lock: sha1:+AfxHg+OW1Xtnl179//Ht2dh8lI= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@supernews.com Xref: g2news1.google.com comp.lang.ada:18499 Date: 2007-11-19T02:47:09+00:00 List-Id: braver writes: > It turned out this should be > > -- Count can be anything below due to our definition of Equivalent: > Position := Counters.Find ((Word => Current_Word, Count => 0)); > > -- which adds to the cumbersomeness of Hashed_Sets vs. Ordered_Maps. > So what are the advantages? Well, if you're going to use the (hashed) set, then you should also instantiate the nested package Generic_Keys, which would allow you to say: Position := Find (Counters, Word);