Quality programming in c -- a rarity?

Fred Fish fnf at unisoft.UUCP
Tue Feb 12 14:02:54 AEST 1985


Gene Bloch writes:
> One problem though - my format is very readable to me, but I might not
> be able to read yours easily (and vice versa, of course).  As a result I
> don't want to maintain your code (again, vice versa too - and I am speaking
> generically as a rhetorical device)....

Good point Gene.  What would really help is a "trainable" C beautifier.
I would train it to my style by feeding it lots of my programs, run
yours through it, and presto ... now I have your code in my style.
When I'm done with it, you do the reverse and we're both happy.

And while we're at it, how about a "cdiff" program that compares
programs at the parse tree level so that comment changes, variable
renamings, etc get ignored.  Now I can make all sorts of improvements
(from my point of view :-) to your N line program without having
diff spit out 2N lines of changes.

Gee, I just gave away two good ideas for a commercial product ... argh!



More information about the Comp.lang.c mailing list