Subject: RE: a new KNF (and some comments)
To: , <email@example.com>
From: Martin Husemann <firstname.lastname@example.org>
Date: 01/21/2000 06:25:14
Just some random questions:
> * ANSI function declarations for private functions (i.e.
> functions not used
> * elsewhere) go at the top of the source module. Only the
> kernel has a name
> * associated with the types. I.e. in the kernel use:
> * void function(int a);
> * in user-land use:
> * void function(int);
Why are there two different versions? I think this is a bad think (TM) in
itself. We may allow both styles, but if we rule we should rule.
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.
> * The function type must be declared on a line by itself
> * preceeding the function.
> static char *
> function(int a1, int a2, float fl, int a4)
This doesn't allow inline documentation of the parameters either. Shouldn't
static char *
int a1, /* .... */
int a2, /* .... */
float fl, /* .... */
int a4) /* .... */
be an option?