Efficient coding considered harmful?

Richard A. O'Keefe ok at quintus.uucp
Fri Nov 4 19:54:10 AEST 1988


In article <10804 at ulysses.homer.nj.att.com> jss at hector.UUCP (Jerry Schwarz) writes:
>In article <624 at quintus.UUCP> ok at 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.



More information about the Comp.lang.c mailing list