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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9c0f2ad38cef26ed X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe) Subject: Re: Garbage collection (was a spinoff of a spinoff of a GA diatribe) Date: 1996/10/23 Message-ID: <54kk6g$is6$1@goanna.cs.rmit.EDU.AU>#1/1 X-Deja-AN: 191448174 references: <9610152135.AA13753@most> organization: Comp Sci, RMIT, Melbourne, Australia nntp-posting-user: ok newsgroups: comp.lang.ada Date: 1996-10-23T00:00:00+00:00 List-Id: "W. Wesley Groleau (Wes)" writes: >Stack objects are collected as a side effect of the call stack mechanism. Ok. >Implementations that transparently put "stack" variables on the heap >usually automatically deallocate at end of scope. Ok. >Explicit use of the heap for non-composite objects is not often done--why >would you? Because you don't *know* it's non-composite. Ada supports information hiding, remember? >And with composites, the provider of the data type has the complete freedom >of choice to extend a controlled type with GC, extend a controlled type >without GC, or not use a controlled type. Once again, the problem is information hiding, only this time it goes the other way. Now the problem is that the provider of the data type has no idea what the client will want to do with it. You cannot, for example, decide to "not use a controlled type" without thereby demanding that the client accept responsibility for manual mangement. And if the client is a generic package receiving this type as a parameter, the client doesn't *know* whether it is required to do manual management (last choice) or forbidden to (first choice). >So, compared to the above, how big is the payoff of having GC imposed on >you by the implementation? Fighting words. Nobody in this thread has been arguing that Ada ought to *impose* GC on anyone, only that it would be better if it were not the case in practice that native-code Ada compilers *deny* it to everyone. As far as I am concerned, better support for information hiding is not the least of the benefits of automatic storage management. -- Mixed Member Proportional---a *great* way to vote! Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.