ANSI C prototypes

Doug Gwyn gwyn at smoke.brl.mil
Wed Nov 7 22:48:28 AEST 1990


In article <3933.27353319 at cc.helsinki.fi> jaakola at cc.helsinki.fi writes:
>Why do *I* have to do the copying for all my functions, while there's
>the compiler which a) is supposed to work for me and not vice versa
>             and   b) should know ANSI peculiarities better than I do?

Oh, for Christ's sake, nobody is forcing you to do anything.  If you
don't like prototypes just don't use them!

>Another ANSI-misfeature is the ability to make declarations such as:
>	int foo(int b, char *s)
>I like much more the old style
>	int foo(b,s)
>	int b;      /* the b means ... blahblahblah */
>	char *s;    /* the s means ... */

And what prevents you from using the old style if you like it better?

By the way, some people like to use the new style definitions like this:
	int  foo(		/* returns ... */
		int   b;	/* the b means ... blahblahblah */
		char *s;	/* the s means ... */
		)

>This is better, because you can have function name and args on the same
>line, so that you can query all function names by grep-like tools

But you have no idea what the argument types are that way; the new style
is better in that respect.

All that your posting really said is that you're comfortable doing things
a particular way and do not wish to change.  Nobody is making you change.



More information about the Comp.lang.c mailing list