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,a644fa9cd1a3869a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-13 15:00:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!netnews.com!xfer02.netnews.com!newsfeed1.cidera.com!Cidera!sjcppf01.usenetserver.com!usenetserver.com!news-west.rr.com!lsnws01.we.mediaone.net!typhoon.san.rr.com!not-for-mail Message-ID: <3BF1A5FC.251D9F20@san.rr.com> From: Darren New Organization: Boxes! X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: List container: Insert and Delete References: <9sn4qm$13g29j$2@ID-25716.news.dfncis.de> <9sok8i$142am0$2@ID-25716.news.dfncis.de> <3BF004F4.F74AE461@boeing.com> <9sp5up$g5o$1@nh.pace.co.uk> <3BF0827A.DCF2213C@acm.org> <9sra40$b8p$1@nh.pace.co.uk> <5DaI7.23016$xS6.35866@www.newsranger.com> <3BF15C70.B7EF23E6@san.rr.com> <3BF19106.5FF19B59@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 13 Nov 2001 23:00:31 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 1005692431 66.75.151.160 (Tue, 13 Nov 2001 15:00:31 PST) NNTP-Posting-Date: Tue, 13 Nov 2001 15:00:31 PST Xref: archiver1.google.com comp.lang.ada:16477 Date: 2001-11-13T23:00:31+00:00 List-Id: Ted Dennison wrote: > Not that I'm saying that there's nothing wrong with you if you need this or > some other esoteric function from a list from time to time. But I think all the > tools are already there to build your "Offset" function, and it won't really be > any slower than if one were provided for you. Agreed, as long as positions can be compared for equality. Anyway, I think the general point I was trying to make was that one *should* be able to do most anything with the list that the data in the list supplies. If it's not even a private type, that pretty much solves all problems. :-) > that is the case, the general rule ought to be to leave the function out, unless > it is something so common that just about any disinterested observer would be > suprised to not find it in there. Sure, as long as stuff like that *can* be done. > >Saying "we're not going to implement this operation because it's > >inefficient" doesn't sound like a good idea to me, is all. > > Stated that way, I'd agree too. What I was suggesting was that stuff that can be > built w/ the other tools easily and is not O(1) (but *is* O(1) with the other > List type) perhaps should not be presented as a primitive. That way people are > encouraged to use the right tool (package) for the job. Again, this was just one > out of three positions I'd like to see discussed, as a middle ground between > total conformity between Bounded and Unbounded and total redesign. I frankly > could see a good case for any of the three. Yes. My concern was that *if* the "position" type can't be compared for equality by the user, you have to provide that in the library somehow. *Then* it becomes a one-liner to translate to integers and back. It's a shame it's not *really* an ADT in the mathematical sense, or we could prove whether or not we have all the functions anyone would want, and whether we have the most efficient implementation of them. :-) -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. You will soon read a generic fortune cookie.