Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!ll-xn!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!osu-cis!att!whuts!homxb!hound!rkl1 From: rkl1@hound.UUCP (K.LAUX) Newsgroups: comp.lang.c Subject: Re: Variable-length messages. Message-ID: <2707@hound.UUCP> Date: 21 Oct 88 20:08:11 GMT References: Organization: AT&T Bell Laboratories, Holmdel Lines: 25 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