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: fac41,9a0ff0bffdf63657 X-Google-Attributes: gidfac41,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,a498aa1404ef5d87 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public From: Matthew Heaney Subject: Re: Why C++ is successful Date: 1998/08/02 Message-ID: #1/1 X-Deja-AN: 377248845 Sender: matt@mheaney.ni.net References: <35AE4621.2EBC7F6A@eiffel.com> <6p83vj$657$1@news.intellistor.com> <35B79E7D.6068DCDF@eiffel.com> <6pg7fg$qhi$1@news.interlog.com> <901533851.20058.0.nnrp-04.9e980ba3@news.demon.co.uk> <35be2a94.57352308@netnews.msn.com> <6plvgl$eaf$1@news-1.news.gte.net> <35bebe5f.95187031@netnews.msn.com> <6pn9af$hqd$1@uuneo.neosoft.com> <35BF49E8.136D75C2@earthling.net> <35C371D1.2E42A046@earthlink.net> <35C3FAFD.DDA89121@earthlink.net> <35C42762.4F8D89C2@earthlink.net> NNTP-Posting-Date: Sun, 02 Aug 1998 11:00:10 PDT Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada Date: 1998-08-02T00:00:00+00:00 List-Id: Jay Martin writes: > Which turned out to be a technical mistake, because > I didn't remember a (non-embedded system) Ada compiler that did > not implement "Unchecked_Deallocation". Imagine > the ridicule from C programmers: "You can call malloc > but you can't even call free!." It was probably too conservative, since the RM recommends that an implementation really support UC. And all implementations of Ada really do support UC. But even if he did use UC in the implementation of his unmanaged forms, this isn't good enough, since the client would still have to explicitly Clear the structure prior to exiting the scope of its declaration. Otherwise a memory leak would occur. This is what you have to do in the managed forms too. I've written an Ada95 data structures library very much like what Booch provided, that does automatic garbage collection. It wasn't that hard. > > The Booch components had a very specific taxonomy. Only "unmanaged" > > components expect a garbage collector. The "managed" forms do their own > > garbage collection (using a storage manager, another component). > > Which excepting multi-tasking and fixed sized forms, made up for > roughly half the Booch components, over a 100 > component permutation banking on GC. His taxonomy provides a menu from which you choose the forms that apply to your situation. You are not expected to use all the forms. The functionality is the same in both the managed and unmanaged forms. Just stick to the managed forms, and no GC is necessary. That "roughly half" of his library "banks on GC" in a weak argument, because you never use that half of the library. If the fact that half the library goes unused upsets you, then just go the the directory where you keep the components, and delete the unmanaged forms. After you do that, then _none_ of the library will depend on GC. And you'll have lots of extra disk space too!