Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!elroy!gryphon!vector!rpp386!jfh From: jfh@rpp386.Dallas.TX.US (John F. Haugh II) Newsgroups: comp.unix.wizards Subject: Re: libpw.a Summary: alloca is the lazy approach. Message-ID: <15945@rpp386.Dallas.TX.US> Date: 21 Apr 89 00:38:44 GMT References: <157@dftsrv.gsfc.nasa.gov> <10013@smoke.BRL.MIL> <8184@chinet.chi.il.us> <1250@frog.UUCP> <564@aablue.UUCP> <1883@thor.acc.stolaf.edu> Reply-To: jfh@rpp386.Dallas.TX.US (John F. Haugh II) Distribution: na Organization: River Parishes Programming, Dallas TX Lines: 24 In article <1883@thor.acc.stolaf.edu> mike@mike@stolaf.edu writes: >I'm the author of GNU grep, and I firmly believe that alloca is Evil. >Don't use it in new programs! The idea is wonderful. Not unlike the goto or middle-tested loops. It fills an emptiness, but requires some degree of discipline. >Many people know that Richard strongly advocates the use of alloca. >But just because Richard uses it in his programs doesn't mean it is >necessarily a good thing! It IS a nice concept. It would be nice if C had better garbage collection, like LISP. I always enjoyed SNOBOL and LISP programming because you use the stuff, then toss it, then use it again. In C and others, memory management is a CHORE. >To repeat: alloca is EVIL. It doesn't have to be. -- John F. Haugh II +-Quote of the Week:------------------- VoiceNet: (214) 250-3311 Data: -6272 | "When everyone else complies InterNet: jfh@rpp386.Dallas.TX.US | I will too ..." UucpNet : !killer!rpp386!jfh +------------------- -- Doug Davis --