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,4f316de357ae35e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-08-14 13:31:39 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: FAQ and string functions Date: 14 Aug 2002 16:22:23 -0400 Organization: NASA Goddard Space Flight Center (skates.gsfc.nasa.gov) Message-ID: References: <20020730093206.A8550@videoproject.kiev.ua> <4519e058.0207300548.15eeb65c@posting.google.com> <20020731104643.C1083@videoproject.kiev.ua> <4519e058.0208010629.5e6182ca@posting.google.com> <20020801194720.Q1080@videoproject.kiev.ua> <4519e058.0208020605.5ab7e092@posting.google.com> <3D4AAF63.72782659@san.rr.com> <3D4B2382.7030209@telepath.com> <3D4B2ACD.FDA29B9A@san.rr.com> <3D4B401E.3060802@telepath.com> <3D4B4477.500088B@san.rr.com> <3D4EA1AC.80D17170@san.rr.com> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 1029357091 7910 128.183.220.71 (14 Aug 2002 20:31:31 GMT) X-Complaints-To: usenet@news.gsfc.nasa.gov NNTP-Posting-Date: 14 Aug 2002 20:31:31 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.ada:28035 Date: 2002-08-14T20:31:31+00:00 List-Id: "Randy Brukardt" writes: > In any case, as with many other "containers" issues, I don't see the > point. There is no advantage to even having a "unbounded arrays" > package, as an access to an array works fine, and there is little > advantage to the package (only an avoidance of memory leaks, easy to > avoid in this case). I disagree. There are many little details about containers that you have to get right, and I prefer to just get them right once, and test them just once. Since I wrote the SAL containers, I have reused them many times, and been very pleased that I did not have to rewrite and retest them. There are 852 lines (comments and whitespace included) in SAL.Poly.Lists.Double; that's big enough to be worth saving and reusing. However, there is significant overhead in the general-purpose containers, so I agree that if I am truly concerned about memory or speed efficiency, I will re-implement a specific container. But even then, it's nice to have SAL available for a prototype, untill I figure out exactly what the final data structure should be. And the SAL test code is a first draft of the specific test code; also very useful. > I perfer to have packages that actually do something that makes it > worthwhile to learn their interfaces, and things like "unbounded > arrays" and "lists" just don't measure up. I'd rather build a > tailored data structure for each purpose, because then I can control > the efficiency (and the effort to write it is not that different). > But I realize that many other people feel differently (perhaps > people aren't learning how to create data structures anymore, just > use them??) People should be aware of data structures, but I feel they should not have to recreate them; they should be able to reuse them. > >And yes, I've already implemented my own unbounded arrays, thanks. > >:-) They're not compatible with your unbounded arrays. *That* is > >the > problem. > > I agree. These things should be packaged in the first place; they're > part of a larger abstraction in your program -- and *that* is what > should be packaged. (Breaking programs into too small chunks is just as > bad as not decomposing enough.) There certainly is a trade-off here. > But I suppose I am getting to be an old fuddy duddy in this way. I > recall thinking how annoying old programmers were when I first > started working on Janus/Ada; now (nearly 22 years later), I sound > like them. Sigh. Probably should go bag groceries. :-) No need to go that far. Just alow us to disagree :). -- -- Stephe