Subject: Re: #define in share/misc/style [was: CVS commit: src/share/misc]
To: None <tech-misc@netbsd.org>
From: John Hawkinson <jhawk@MIT.EDU>
List: tech-misc
Date: 03/02/2003 13:31:13
There being insufficient clarity on the subject, I've backed this out
and replaced it:

 /*
  * Macros are capitalized, parenthesized, and should avoid side-effects.
- * Use one TAB between #define and the macro name; spacing after the macro
- * name may be any whitespace, as appropriate.
+ * Spacing before and after the macro name may be any whitespace, though
+ * use of TABs should be consistent through a file.
  * If they are an inline expansion of a function, the function is defined
  * all in lowercase, the macro has the same name all in uppercase.
  * If the macro is an expression, wrap the expression in parenthesis.


Greg A. Woods <woods@weird.com> wrote on Mon, 24 Feb 2003
at 18:07:37 -0500 in <m18nRhB-000B3GC@proven.weird.com>:


> I've never ever seen even the barest hint of reasonable rationale for
> using a tab instead of a space beteen the "#define" and the macro name
> which follows it.

Well, I believe the rationales are a) consistency b) a desire to
use TABs as a generalized seperator. b) doesn't hold a huge amount
of weight, but it allows consistency with other kinds of syntaxes
where spaces may not be the conceptual seperator.



In any event, a few statistics are also instructive:

Out of 33k #defines in the tree, 22k are #define<SP> and 10k are
#define<TAB>. Moreover, out of 20k files that contain #defines,
14k use spaces and 6k use tabs.

Personally, I have an irrational attachment to the use of tabs here,
and would like to see a bit more inter-BSD consistency, but I don't
think those reasons are strong enough here.

--jhawk