Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site h-sc1.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!h-sc1!thau From: thau@h-sc1.UUCP (robert thau) Newsgroups: net.lang.c Subject: Re: casts to (void) [considered harmful] Message-ID: <493@h-sc1.UUCP> Date: Fri, 2-Aug-85 00:42:46 EDT Article-I.D.: h-sc1.493 Posted: Fri Aug 2 00:42:46 1985 Date-Received: Sat, 3-Aug-85 05:46:25 EDT References: <11@brl-tgr.ARPA> <> <168@telesoft.UUCP> Organization: Harvard Univ. Science Center Lines: 21 > The use of (void) also points out the fact that the programmer > *intentionally* is ignoring the return value of the function. > At the very least it is useful documentation. > > KEITH F. PILOTTI -- TeleSoft (619) 457-2700 x172 *** Flame warning *** printf() is invariably used as a formatted-output statement, not as a value-returning function. A "(void)" which makes this fact explicit not only adds no information to a program, but obscures things by hiding the actual code behind a forest of (face it, folks) lint directives. What's worse, there are far too many people who believe that "(void)", "/*ARGSUSED*/" and the ilk are documentation rather than clutter; their code is generally bereft of comments which *explain* data structures, *elucidate* obscure algorithms, and *clarify* code. DOWN WITH LINT SALAD!!! *** Flameout *** -- Robert Thau \ Keeper of the *FLAME* )) rst@tardis.ARPA ( ( h-sc1%thau@harvard.ARPA \\