Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!quintus!ok From: ok@quintus.uucp (Richard A. O'Keefe) Newsgroups: comp.lang.c Subject: Re: Efficient coding considered harmful? Message-ID: <627@quintus.UUCP> Date: 4 Nov 88 09:54:10 GMT References: <3105@hubcap.UUCP> <34112@XAIT.XEROX.COM> <1700@dataio.Data-IO.COM> <8630@smoke.ARPA> <1704@dataio.Data-IO.COM> <119@twwells.uucp> <342@auspex.UUCP> <1709@garth.UUCP> <618@quintus.UUCP> <1718@garth.UUCP> <624@quintus.UUCP> <10804@ulysses.homer.nj.att.com> Sender: news@quintus.UUCP Reply-To: ok@quintus.UUCP (Richard A. O'Keefe) Organization: Quintus Computer Systems, Inc. Lines: 24 In article <10804@ulysses.homer.nj.att.com> jss@hector.UUCP (Jerry Schwarz) writes: >In article <624@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: >>What we're talking about here is a technique for maintaining dynamically >>sized data structures. Just to keep it simple: > >It seems that way. So since this discussion has very little to do with >C at this point perhaps it should be moved elsewhere. I didn't intend to say any more about this, but I can't let "very little to do with C" stand. In any halfway decent programming language, flexible data structures should just be _there_ as part of the language, without requiring the programmer to kludge them up using unsafe operations (malloc(), free(), and realloc() are demonstrably unsafe: hacks to catch memory leaks have been discussed here several times). Given that C's claim to fame is giving you all the rope you need, and given that we have posters who evidently didn't _know_ how to maintain flexible arrays in C, I think there was some point in the discussion, and especially some point in exhibiting simple code to illustrate the technique. If we come right down to it, most of the raving that's been going on about efficiency hacks (desirable or not) was old news to Fortran programmers 10 years ago. Should that discussion be moved elsewhere? Well, I'm using my 'n' key a lot, but evidently there are people reading this group who care about it. It's their newsgroup too.