Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: ccl

Reply
Thread Tools

Re: ccl

 
 
HENRY Eshbaugh
Guest
Posts: n/a
 
      08-29-2011
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.
 
Reply With Quote
 
 
 
 
Ben Bacarisse
Guest
Posts: n/a
 
      08-29-2011
HENRY Eshbaugh <(E-Mail Removed)> writes:

> The code is pretty good, but the coding style sucks.
>
> Either use ONE CONSISTENT coding style, or don't offer the library in
> public.


That's an odd point of view. Why should it not be offered? Do you see
a risk to innocent coders' style from mere the fact that it's visible?
I don't see the harm.

<snip>
> My advice on how to fix it: K&R, underscores. That's it.


That's how I like to write C[1] but it dates me. Almost all the newCode
ISee has gone MixeCase with no separators.

[1] I use Initial_Caps for classes in C++ but I can't ditch the _s even
there.

--
Ben.
 
Reply With Quote
 
 
 
 
jacob navia
Guest
Posts: n/a
 
      08-29-2011
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
 
Reply With Quote
 
HENRY Eshbaugh
Guest
Posts: n/a
 
      08-30-2011
Again, I ****ed up with the reply. Sorry guys.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updates to the ccl jacob navia C Programming 35 07-07-2012 03:53 PM
CCL vs STL: a comparison jacob navia C Programming 29 05-12-2012 04:31 PM
ccl and stl: design differences jacob navia C Programming 0 04-17-2011 06:55 PM
New release of the C Containers Library (CCL) jacob navia C Programming 117 11-15-2010 04:12 PM
Re: New release of the C Containers Library (CCL) Jon C++ 16 11-09-2010 09:38 AM



Advertisments