[MPlayer-dev-eng] the great reformatting
Diego Biurrun
diego at biurrun.de
Sun Mar 6 14:33:07 CET 2011
On Sun, Mar 06, 2011 at 01:37:32PM +0100, Ingo Brückl wrote:
> Diego Biurrun wrote on Sat, 05 Mar 2011 21:16:47 +0100:
>
> >> Oh, sorry for not mentioning. Yes, I'd like to remove the unnecessary
> >> variable names from header files (redundant and not needed by the compiler)
> >> unless of course this would be against the coding style.
>
> > It would - IMHO - be stupid to remove such valuable information, why
> > would you want to do such a thing?
>
> I consider this a redundant and useless information.
>
> > but developers also read header files, not just compilers...
>
> IMO there cannot much be learned without an explanation of the parameters.
Correct. But the names of the parameters should be that explanation!
If the parameters are just called a1, a2, a3, then they are worthless,
but if they have sensible names..
I'll give an example: People often forget the order of parameters.
Compare
char *strstr(const char *, const char *);
vs.
char *strstr(const char *haystack, const char *needle);
Obviously in the latter form just one glance at the function prototype
tells you which parameter is which, while in the former case you will
have to dig through the documentation.
In some cases the meaning of the parameters will be clear from the types
but in others, like the above, it will not. Why then remove information
that some people find useful? It will never hurt, but sometimes help.
In any case I am vehemently against folding such a change into the
uncrustification.
Diego
More information about the MPlayer-dev-eng
mailing list