[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Namespace pollution in lua.h
- From: Adolf Mathias <dolfi@...>
- Date: Tue, 15 May 2001 17:21:43 +0200
David Jones wrote:
>
> Why do you append an underscore to macro parameter names? There are no
> unexpected pollution problems. The body of the macro, which appears
> immediately after the first space, is the only place where these names
> have any meaning.
I picked up this habit because things sometimes get a little more
systematic when I write stuff like
struct { int v; } s;
#define INIT(v_) s.v = v_
When writing macros with side effects, this has reduced the required
amount of naming creativity greatly. Other than that, it's just a
convention like always 'uppercasing' macro names, capitalizing types
andclasses, and lowercasing variables and function names.
#define MACRO(i) function(i)
Dolfi