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,ce0900b60ca3f616 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-12 10:39:21 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!sjcppf01.usenetserver.com!usenetserver.com!news-west.rr.com!lsnws01.we.mediaone.net!typhoon.san.rr.com!not-for-mail Message-ID: <3BF01760.A21F56B3@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 strawman References: <3BE29AF4.80804@telepath.com> <3BE29BD4.10401@telepath.com> <3BE2DB99.B707D409@boeing.com> <3BE32A18.18404AD1@boeing.com> <3BE443DE.574D669C@acm.org> <3BE58FDD.E1FB1815@san.rr.com> <3bec1cbe$0$15824$626a54ce@news.free.fr> <9sib27$13aeg3$5@ID-25716.news.dfncis.de> <9sk5rn$140qdr$2@ID-25716.news.dfncis.de> <3BEDB57E.1203D638@otelco.net> <9sktgk$134npc$1@ID-25716.news.dfncis.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 12 Nov 2001 18:39:46 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: typhoon.san.rr.com 1005590386 66.75.151.160 (Mon, 12 Nov 2001 10:39:46 PST) NNTP-Posting-Date: Mon, 12 Nov 2001 10:39:46 PST Xref: archiver1.google.com comp.lang.ada:16350 Date: 2001-11-12T18:39:46+00:00 List-Id: Nick Roberts wrote: > Doing the equivalent of what my example procedure Normalize_Names did using > inserts and deletes with an iterator would have ended up with code that was > more difficult to program, more difficult to read, slower in execution, and > (I think) more wasteful of memory. Showing this was the true purpose of my > example. Admittedly, I really need to add more detail, but it's finding the > time :-( Using sequences like this when the problem is expressed in terms of a loop over all elements makes sense. Using sequences when the problem is expressed in other forms may not. If your list is a list of characters that you're trying to parse, for example, matching up parens or doing reg-exp sorts of stuff (yes, I know you'd use strings) then only doing reads *or* writes, only going in one direction doesn't make good sense. If you have an ordered list and you want to insert an element in the right place, copying the entire list to do so isn't very efficient. -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. You will soon read a generic fortune cookie.