jacob navia
8/29/2011 8:21:00 PM
Le 29/08/11 16:04, HENRY Eshbaugh a écrit :
> The code is pretty good, but the coding style sucks.
>
> Either use ONE CONSISTENT coding style, or don't offer the library in
> public. Just looking at some of the source, I'm scared at how
> inconsistent it is. You seem to prefer Pascal-case, but then I read
> list.c and see this:
>
> static list_element *new_link(Link *li,void *data,const char *fname)
>
> static int DefaultListCompareFunction(const void *left, const void
> *right, CompareInfo *ExtraArgs)
>
> static int Clear_nd(List *l)
>
> You have not one, but THREE different ways of naming your functions. I
> can't stress the point enough that that _SUCKS_.
>
> My advice on how to fix it: K&R, underscores. That's it.
OK, I will rename the functions with a cobsistent stym, but it is
not that important since all those functions are static, i.e. they
do not belng to the library interface specifications.
Within ALL the exported functions I have consistently named functions
with several words with ALWAYS the first letter capitalized.
The exported functions are important actually. I haven't used a
consistent naming within the static functions.
But you do have a point.
Thanks for the input.
jacob