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!lll-tis!ames!mailrus!purdue!decwrl!sun!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.ada Subject: Re: Garbage Collection Message-ID: <864@quintus.UUCP> Date: 14 Dec 88 06:40:47 GMT References: <6702@june.cs.washington.edu> <3865@hubcap.UUCP> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. List-Id: In article <3865@hubcap.UUCP> billwolf@hubcap.clemson.edu writes: > Basically, I charge garbage collection with the same crime that > the GOTO was charged with: its sole function is to facilitate > UNDISCIPLINED programming. From Tremblay and Sorenson, 1985: This is completely back-to-front. Doing your own storage management is like doing your own stack management instead of using procedure calls. If you want to compare garbage collection with a control structure, compare it with resursive procedures. > If this charge can be successfully prosecuted, then garbage > collection will face the same penalty: the total elimination > of the facility, in favor of a more disciplined environment. I think it would be very hard to accuse functional programming languages like ML of providing an _un_disciplined environment. Yet automatic storage control is vital to them. A word about the history of ML may make this clearer. ML was originally the MetaLanguage of Edinburgh LCF, a system for doing proofs about computations. It is strongly typed, because it was important that anything the system claimed to be a proof should be a valid proof. There is a basic set of proof-forming operations which are known to be valid. The language cannot permit changes to elements of a data structure, otherwise the arguments to a proof might be changed after the proof was constructed, rendering it invalid. "deallocate" simply doesn't make sense in that kind of environment. Storage management is particularly easy in a language without side effects to data structures.