Subject: Re: a new KNF (and some comments)
To: None <tech-misc@netbsd.org, tech-kern@netbsd.org>
From: Peter Seebach <seebs@plethora.net>
List: tech-misc
Date: 01/21/2000 00:28:02
In message <NCBBKMPDNDDMCAGNFNDIEEEICPAA.martin@rumolt.teuto.de>, "Martin Husem
ann" writes:
>Dependend on the context I find anonymouse parameters anoying. How should
>you know wich one is the "flag" parameter if you pass four ints to a
>function? Maybe I'm too much used to developement tools where you see the
>function prototype as a tooltip in the text editor as soon as you type the
>openening paranethesis after the function name.
Unfortunately, this is "not secure".
Imagine, for a moment
/* foo.h */
int foo(int flag);
/* foo.c */
...
#define flag int
#include "foo.h"
I know it shouldn't happen, but it will.
>static char *
>function(
> int a1, /* .... */
> int a2, /* .... */
> float fl, /* .... */
> int a4) /* .... */
If this is allowed, it should be
int, /* a1: the first first letter of the alphabet */
int, /* a2: the second first letter of the alphabet */
IMHO.
-s