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: 103376,4b06f8f15f01a568 X-Google-Attributes: gid103376,public X-Google-Thread: f43e6,9a0ff0bffdf63657 X-Google-Attributes: gidf43e6,public X-Google-Thread: 1108a1,9a0ff0bffdf63657 X-Google-Attributes: gid1108a1,public From: harald.mueller@siemenscom.com Subject: Re: Why C++ is successful Date: 1998/08/07 Message-ID: <6qfhri$gs7$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 378901334 References: Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Fri Aug 07 18:42:58 1998 GMT Newsgroups: comp.lang.eiffel,comp.object,comp.software-eng,comp.lang.ada X-Http-User-Agent: Mozilla/4.04 [en] (Win95; I) Date: 1998-08-07T00:00:00+00:00 List-Id: In article , dewar@merv.cs.nyu.edu (Robert Dewar) wrote: > > Lars says > > < programs than exceptions? If so, why? > >> > > Most certainly! GC introduces a huge risk for incorrect programs. Garbage > collectors assume that the pointer structure of a program is correct. If > it is corruptede, garbage collectors can cause horrible havoc. Indeed this > havoc often only shows up after several mark-and-sweep type cycles of the > GC, and it can be almost impossible to track them down > > (said from horrible experiences in implementing general GC!) > Now that's interesting. I did never write a GC, but I wrote a heap management system, which had bugs in it for the first few weeks, and you wouldn't believe it: A correct GC would have been MUCH BETTER than my wrong heap management. So? Actually, the problem with new/delete schemes is that the *user*(!!) can corrupt the heap, e.g. by deleting stack variables: f(C* p) { C defaultC; C* c; if (p == null) c = &defaultC; else c = p; ... ... ... delete c; } Similar with static class variables etc. You wouldn't believe how many heaps silently and very late crash after such errors (which are mostly introduced innocently during maintenance - "we dont have to create a new C all the time - just let's have a single static one"). HMMueller -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum