Xref: utzoo alt.religion.computers:2118 comp.lang.c:34440 Path: utzoo!utgpu!cs.utexas.edu!wuarchive!hsdndev!spdcc!ima!dirtydog!karl From: karl@ima.isc.com (Karl Heuer) Newsgroups: alt.religion.computers,comp.lang.c Subject: Re: Argument declaration style (Was: ANSI C prototypes) Message-ID: <1990Dec02.224903.8116@dirtydog.ima.isc.com> Date: 2 Dec 90 22:49:03 GMT References: <3933.27353319@cc.helsinki.fi> <_1X6_32@xds13.ferranti.com> <3944.27367fb2@cc.helsinki.fi> <1990Nov06.233654.29974@dirtydog.ima.isc.com> <1990Nov28.183850.20592@ccu.umanitoba.ca> Sender: news@dirtydog.ima.isc.com (NEWS ADMIN) Reply-To: karl@ima.isc.com (Karl Heuer) Followup-To: alt.religion.computers Organization: Interactive Systems Lines: 23 In article <1990Nov28.183850.20592@ccu.umanitoba.ca> salomon@ccu.umanitoba.ca (Dan Salomon) writes: >In article <1990Nov06.233654.29974@dirtydog.ima.isc.com> karl@ima.isc.com (Karl Heuer) writes: >>... (Also, I very rarely have a function whose prototype doesn't fit on a >>single line.) ... Even with pre-ANSI code I use >> void foo(x, y) char *x; int y; { > >This is kind of a wimpy example isn't it? [My code would look more like] >ST_Gen_Class *ST_Lookup_No_Err (char *found_symb; Scope_Level_Ptr Start_Scope); I stand by my example. I find short names easier to read than longer ones, as long as they're mnemonic. (In real code the parameters would probably be named `s' and `n', and if necessary their purpose would be described in a block comment above the function, which would not be called `foo'.) In a quick scan of my directory, I find that, of 1491 function definitions in my style, only 26 of them (1.7%) consume 80 or more columns. >For long headers like these, splitting the formal parameters across lines >improves readability. I strongly disagree. Karl W. Z. Heuer (karl@ima.isc.com or uunet!ima!karl), The Walking Lint Brought to you by Super Global Mega Corp .com