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=unavailable autolearn_force=no version=3.4.4 Path: border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Optimizing Ada Date: Wed, 02 Oct 2013 09:41:38 -0700 Organization: Also freenews.netfront.net; news.tornevall.net Message-ID: References: <8aca502c-bba8-4af5-9192-459c15fe048b@googlegroups.com> <74846968-cda1-4643-9c11-c38ce5c55949@googlegroups.com> <2cdd0d7d-d62c-42fc-9e5c-beed749f425a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Wed, 2 Oct 2013 16:41:40 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="5a64620cc83ca47629e9cd617d12fc26"; logging-data="22725"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+I7dvQVgOMmoi93Hq0QIldwbh9xxi3zfI=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 In-Reply-To: <2cdd0d7d-d62c-42fc-9e5c-beed749f425a@googlegroups.com> Cancel-Lock: sha1:x/x6dZYo5uAcfkZNqp1vpYdILLs= X-Original-Bytes: 2148 Xref: number.nntp.dca.giganews.com comp.lang.ada:183574 Date: 2013-10-02T09:41:38-07:00 List-Id: On 10/01/2013 09:24 PM, kennethesills@gmail.com wrote: > > Other than that, is the code itself clean/idiomatic enough? Not teaching myself any bad habits? The code reads fine. There are some stylistic differences from how I'd write it, but that's true for everyone. I haven't seen that version of Insert used very much, so I might add a comment to remind the reader how it works when the key is already in the map. I would probably avoid calling Update_Element when Insert succeeds. Perhaps most important, I would be leery of writing a function that returns a map, but that may be a requirement out of your control -- Jeff Carter "Go and boil your bottoms." Monty Python & the Holy Grail 01