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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ac39a12d5faf5b14 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-22 07:16:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.icl.net!xara.net!gxn.net!195.149.39.220.MISMATCH!news-peer.gradwell.net!easynet-melon!easynet.net!uio.no!193.216.69.35.MISMATCH!dax.net!juliett.dax.net!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Grace and Maps (was Re: Development process in the Ada community) References: <3CB46975.90408@snafu.de> <3CBAFFEE.2080708@snafu.de> <4519e058.0204171036.6f0a7394@posting.google.com> <3CBDD795.4060706@snafu.de> <4519e058.0204180800.44fac012@posting.google.com> <3CBF0341.8020406@mail.com> <4519e058.0204190529.559a47ae@posting.google.com> <3CC1C6B3.6060306@telepath.com> <3CC21747.5000501@telepath.com> <4519e058.0204220531.3a47ba39@posting.google.com> From: Ole-Hjalmar Kristensen Message-ID: <7v4ri3lsze.fsf@vlinux.voxelvision.no> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 22 Apr 2002 14:15:33 GMT NNTP-Posting-Host: 193.216.12.150 X-Complaints-To: abuse@tele2.no X-Trace: juliett.dax.net 1019484933 193.216.12.150 (Mon, 22 Apr 2002 16:15:33 MET DST) NNTP-Posting-Date: Mon, 22 Apr 2002 16:15:33 MET DST Organization: Tele2 Norway AS Public Access Xref: archiver1.google.com comp.lang.ada:22913 Date: 2002-04-22T14:15:33+00:00 List-Id: dennison@telepath.com (Ted Dennison) writes: > Kilgallen@SpamCop.net (Larry Kilgallen) wrote in message news:... > > In article <3CC21747.5000501@telepath.com>, Ted Dennison writes: > > > > > On second thought, we really ought to get some kind of consensus on > > > requirements before rushing headlong into design. If nothing else, it > > > will save a lot of arguments. > > > > > > Requirements I think ought to be included (using the usual should/shall > > > language): > > > > > > Maps shall provide for key lookup in no worse than O(logn) average time > > > and O(n) worst case (where n is the # of elements in the map). > > > > > > Maps shall provide for creation of a sorted list or array, or traversal > > > in sorted order, in no worse than O(n) time. (In other words, the map is > > > kept sorted as elements are added). > > > > > > Maps should provide an interface consistent with Lists, as far as is > > > practicable. > > > > > > Comments? > > > > While the interface should not _prevent_ implementations from > > achieving certain performance goals, I don't think performance > > goals should be part of the requirements. If a vendor wants to > > provide a relatively slow implementation, that is their choice, > > just like their choice regarding how fast A := B'length should > > perform. > > I can see your point. For real-time use its vital to know this. I'd > prefer to see it in the requrements that Maps are usable in real-time > once the map is already built, which is what these requirements are > getting at. > > Perhaps I am committing the cardinal sin of trying to design with > requirements though. > > > -- > T.E.D. > Home - mailto:dennison@telepath.com (Yahoo: Ted_Dennison) > Homepage - http://www.telepath.com/dennison/Ted/TED.html I think that it should be part of the specification. Otherwise, you will be tempted to roll your own because you do not trust the implementation. Essentially, it's a guarantee of 'quality of service'. If you are not interested in performance, you could very well get by with just a list implementation and limit your library to that :-)