Article View: comp.lang.misc
Article #5292Garbage collection
From: Erland Sommarskog
Date: Tue, 15 Mar 1988 08:51
Date: Tue, 15 Mar 1988 08:51
28 lines
1692 bytes
1692 bytes
Edmund E Howland (cbseeh@fang.ATT.COM) writes:
>Huh?
>Since when have these three ever had a need for garbage collection?
>I am not too familiar with Ada, but garbage collection exists in
>languages for whom dynamic binding is a way of life, not an option.
If I define and implement a package for a data type of some sort in
Ada I can hide the implementation of the type, just providing a set
of operations. At a later state I can change the implementation without
affecting the interface.
However, I must already in the first step, decide whether objects of
this type should be dynamic or not. Not so much for a allocation routine,
you quite often need an initiation routine, anyway. But do I need a
deallocation routine? If there is garbage collection, I don't have to
think of this problem.
Yes, I can one there just in case, but then the calling units have to
bother about using them, which may require a lot of clean-up code, which
might be totally unnecessary.
Generally, garbage collection is a must in object-oriented programming.
(No, I don't belive Ada is a true OO-language.)
--
Erland Sommarskog
ENEA Data, Stockholm
sommar@enea.UUCP "Si tu crois l'amour tabou...
Regarde bien, les yeux d'un fou!!!" -- Ange
Technical Details
Message-ID:
<2849@enea.se>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!enea!sommarReferences:
<272@fang.ATT.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!mcvax!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.misc,comp.lang.modula2 Subject: Garbage collection Message-ID: <2849@enea.se> Date: 15 Mar 88 08:51:15 GMT References: <272@fang.ATT.COM> Reply-To: sommar@enea.UUCP(Erland Sommarskog) Followup-To: comp.lang.misc Organization: ENEA DATA AB, Sweden Lines: 28