Variable-length messages.

K.LAUX rkl1 at hound.UUCP
Sat Oct 22 06:08:11 AEST 1988


	I definitely would go with version 2 because in version 1, you most
certainly are being misleading.  I know both versions will work, but, in the
long run, don't get (pardon the phrasing), but don't get 'cute' with your
code.

	It is well known that C programs can be written as to be totally
illegible (remember the 'Most Obfuscated C Program Contest'?).  That isn't
the point of writing the code.  If, for example, you have a program that
is very large and complex, then, 6 months (years?) from now when it needs
to be upgraded, modified, fixed, whatever, even the orginal programmer can
be mightily confused as to exactly what was going on then and why (i.e. what
was the original intent).

	As a consultant, I spend a lot of time cleaning up code that was
written ala version 1. (If you want to keep me in business, DO write it the
first way 8-). )  Even though there may be a tendency of 'Aw, we can get
away with it', don't.

	Remember, the code should be flexible and easily maintainable by
*those who didn't have anything to do with originally writing it in the
first place*.  There, please write your code in a straight-forward manner,
without throwing up an obstacles to clear understanding as to how the code
works

--rkl



More information about the Comp.lang.c mailing list