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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!uunet!lll-winken!ames!mailrus!uflorida!gatech!hubcap!billwolf From: billwolf@hubcap.clemson.edu (William Thomas Wolfe,2847,) Newsgroups: comp.lang.ada Subject: Re: Garbage Collection Message-ID: <4043@hubcap.UUCP> Date: 8 Jan 89 19:24:30 GMT References: <124000031@inmet> Sender: news@hubcap.UUCP Reply-To: billwolf@hubcap.clemson.edu List-Id: >From article <124000031@inmet>, by ryer@inmet.UUCP: > > Why some Ada compilers should be allowed to perform garbage collection: > > a. Because they are to generate code that coexists in an environment with > languages like LISP where garbage collection is assumed. They want to > operate on data structures shared with other languages. Assume that the Ada code cleans up after itself. Then that code can exist perfectly in a Lisp environment; since it does not contribute to the garbage problem, the Ada code will be a very welcome guest indeed. > b. Because the current world supply of "reusable" Ada components have > not all been written carefully for space management, and in prototyping > any reusable component (that works) may be better than none. However, I'll bet that most have. At any rate, once New Ada emerges, you can bet there will be an immediate upgrading taking place among all the component vendors; the upgraded components will be available long before the New Ada compilers. > c. Because some users are very unconcerned with the efficiency or > reusability of their programs. This applies to the run-only-once > programs such as in a training environment, or where a computer is used > as an oversized desk calculator just to obtain numeric answers. It may > be that all computer science students should become careful implementers > of ADTs. I doubt that all particle physicists need to develop this > discipline even though they may write substantial programs. Let's face it: with generics, multitasking, and so on, Ada is a language for professionals. Most nonprofessionals should be using application-specific languages, which are implemented in... Ada. Particle physicists usually require high-performance software, and they should therefore turn to professional application developers. > d. It Is FEASIBLE for the computer to do a good job of garbage collection > automatically and it does reduce the size of the source code which does > tend to reduce the life cycle cost of owning that code. It may increase > execution time but some users will prefer this tradeoff. The reduction in size is trivial. Additionally, I contend that there are positive side effects with regard to a more complete programmer understanding of the problem, which leads to better overall code. Furthermore, the use of the ADT paradigm, in conjunction with the automatic destruction of local environments, means that application programmers will almost never have to deal with deallocation on an explicit basis anyway. This will provide positive incentive to use professionally designed ADTs, leading once again to higher- quality code. > Therefore, garbage collection should not be prohibited, even though it > is inappropriate and harmful in some cases. I'll heartily agree that GC is inappropriate and harmful, but you still haven't proven your case. Bill Wolfe wtwolfe@hubcap.clemson.edu