Xref: utzoo comp.lang.c++:3606 comp.lang.eiffel:253 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!csd4.milw.wisc.edu!leah!rpi!sun.soe.clarkson.edu!cline From: cline@sun.soe.clarkson.edu (Marshall Cline) Newsgroups: comp.lang.c++,comp.lang.eiffel Subject: Re: Eiffel vs. C++ -- Let's drop the garbage collection arguments Summary: The garbage collection arguments are getting OUT OF HAND!!! Message-ID: Date: 9 Jun 89 19:21:52 GMT References: <77300029@p.cs.uiuc.edu> <1021@krafla.rhi.hi.is> Sender: news@sun.soe.clarkson.edu Reply-To: cline@sun.soe.clarkson.edu (Marshall Cline) Organization: Clarkson University, Postdam NY Lines: 64 In-reply-to: snorri@rhi.hi.is's message of 9 Jun 89 11:19:28 GMT In article <1021@krafla.rhi.hi.is> snorri@rhi.hi.is (Snorri Agnarsson) writes: >From article <77300029@p.cs.uiuc.edu>, by johnson@p.cs.uiuc.edu (Ralph Johnson): >>>Written 6:48 pm Jun 4, 1989 by bertrand@eiffel.com (Bertrand Meyers): >>>Garbage collection >> This is both a major advantage and disadvantage. Would you advise >> us writing our operating system in Eiffel instead of C++? What >> impact does your garbage collector have on real-time software? >In my opinion garbage collection is the single most useful feature >of a programming language..... >.... Consider the following C function: [...deleted...] >If C had garbage collection we could write code such as: [...deleted...] >Instead we have to write as follows: [...deleted...] I'm going to *TRY* not to take sides in the war over the value of GC. I **AM** going to say that the line of thinking is getting *OUT*OF*HAND*!! The original poster (Bertrand Meyers) said he liked GC for such-in-such a problem. The respondent (Ralph Johnson) said real-time software wasn't suited for GC. Now we get Snorri Agnarsson saying that he can come up with an example where GC is useful. WAKE UP FOLKS! GC *IS* a useful feature *SOMETIMES*. It *MAY* not be a useful feature *ALL* the time! The argument is getting WAY off course. It's simply not true that: "Language X is better than Y *ALL* the time because it has feature Z which is useful *SOME* of the time". >It is often said that garbage collection is too costly, but I suggest >that in the above example the solution with garbage collection is >probably more efficient, both in programmer effort AND in >the speed of the resulting program. By the way, if garbage collection >is too expensive, how about 'malloc' and 'free'? Do you think those >routines are less expensive? Why do you think so? No one in the C++ camp is saying that malloc()/free() are "free". The point is simply that malloc()/free() is ***CONTROLLABLE***. That's what C/C++ programmers like: TO BE IN CONTROL. That't what Eiffel programmers DON'T like: TO BE FORCED TO CONTROL. *NO* *NO* *NO* language is best under *ALL* *ALL* *ALL* circumstances. Any sufficiently experienced computer professional chooses the best tool to fit the job. C++ folks don't want to be FORCED to have garbage collection ALL the time. Eiffel folks don't want to be FORCED to memory allocation ALL the time. C++ folks like the machine to do exactly what/when they tell it to. Eiffel folks like a higher level of abstraction from the machine. Conclusion: Let's drop the garbage collection argument from this discussion. >>>Bertrand Meyer >> Ralph Johnson >Snorri Agnarsson Marshall Cline -- ________________________________________________________________ Dr. Marshall P. Cline ARPA: cline@sun.soe.clarkson.edu ECE Department UseNet: uunet!sun.soe.clarkson.edu!cline Clarkson University BitNet: BH0W@CLUTX Potsdam, NY 13676 AT&T: (315) 268-6591