Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!gatech!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.sw.components Subject: Re: GC & exception handling Message-ID: <6623@hubcap.clemson.edu> Date: 28 Sep 89 18:54:27 GMT References: <615@hsi86.hsi.UUCP> Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu Lines: 22 From wright@hsi.UUCP (Gary Wright): > In an a language like Ada I would first have to write a dispose > procedure for integers in a list, then I would need a dispose procedure > for a list of integers in a stack and then a dispose procedure for a > stack of lists of integers in a stack. Then I could finally use this > new ADT. No, you only write one Destroy procedure for the atomic type; you then get in return a Destroy procedure applying to the container (the list of whatever). This new Destroy can then be automatically supplied to any enclosing container, ad infinitum. >> As far as other costs go, the copying burden comes for free because >> we need to assure update-independent semantics anyway. > > Where is this requirement specified? Programmers generally prefer to work with containers which do provide this service. It's a market requirement. Bill Wolfe, wtwolfe@hubcap.clemson.edu