Subject: RE: function definitions
From: WJCarpenter (bill-abisource@carpenter.ORG)
Date: Fri Dec 29 2000 - 14:59:51 CST
jesper> A bad habbit I guess - it makes the code look pwetty in emacs
jesper> since it does a better job of highlighting the function name /
jesper> types and stuff. All stems from the GNU coding standard uses
jesper> that format, I guess.
Heh. Thousands of years ago, when I was at Bell Labs (the land that
time forgot), my tiny duck brain got imprinted that the right way was
as you have done:
return_type_stuff
function_name(args....)
{
}
So, now the other way looks peculiar to me. I have always found the
two-line approach better for me when I'm visually scanning source
files. It makes it easier for me to find a function by name. (But at
least I admit that it's mostly a "primacy effect"
<http://web.psych.ualberta.ca/~mike/Pearl_Street/Dictionary/contents/P/primacy_effect.html>
:-).
BTW, the reason everyone did it the above way around me was similarly
arcane. There were some popular utilities for producing
cross-references and pretty prints of source code, and they were too
dumb to find the beginnings of functions if they didn't start in the
first column (and be *immediately* followed by the opening paren, and
have a closing paren as the *last* character on the line).
You've probably been down this trail:
<http://www.abisource.com/~sam/docs/AbiSourceCodeGuidelines.html>
It doesn't address the point you're asking about, but it does have
some items of similar levels of picayunity.
-- bill@carpenter.ORG (WJCarpenter) PGP 0x91865119 38 95 1B 69 C9 C6 3D 25 73 46 32 04 69 D6 ED F3
This archive was generated by hypermail 2b25 : Fri Dec 29 2000 - 14:58:53 CST