K
Khookie
Hi everyone
I've been dev'ing in C for the past few months, and was wondering
whether there was a standard coding style for private functions
(function/s not defined in the header file) and documenting functions
(should this be done in the header or C file, and is there a
standard?)
For example: to make a function private in Python, you prefix the name
with two underscores. Python also provides a functionality called
docstrings to write doco for functions.
I'm looking for a generally accepted style... primarily so that I can
be a good C citizen & so the next developer doesn't want to kill
me
And also, do any C developers here use camel case (popular in C#/Java)
in their day to day C coding? I notice most code in C using plenty of
underscores, so I've been keeping with that. IMHO, I prefer the look
of camel case though.
E.g. Camel case = socketDescriptor vs. underscores = socket_descriptor
Cheers
Chris
BTW, I know there are plenty of C style guides around, but they all
seem to be very verbose - so I hope someone here can indulge my
ignorance
I've been dev'ing in C for the past few months, and was wondering
whether there was a standard coding style for private functions
(function/s not defined in the header file) and documenting functions
(should this be done in the header or C file, and is there a
standard?)
For example: to make a function private in Python, you prefix the name
with two underscores. Python also provides a functionality called
docstrings to write doco for functions.
I'm looking for a generally accepted style... primarily so that I can
be a good C citizen & so the next developer doesn't want to kill
me
And also, do any C developers here use camel case (popular in C#/Java)
in their day to day C coding? I notice most code in C using plenty of
underscores, so I've been keeping with that. IMHO, I prefer the look
of camel case though.
E.g. Camel case = socketDescriptor vs. underscores = socket_descriptor
Cheers
Chris
BTW, I know there are plenty of C style guides around, but they all
seem to be very verbose - so I hope someone here can indulge my
ignorance