[Netnice-developer] Coding conventions
Status: Alpha
Brought to you by:
taost6
From: Sergei M. <mo...@op...> - 2003-11-11 04:29:55
|
Takashi Okumura wrote: >>PS. BTW, do we have any coding guidelines? I mean, is there conventions >>about naming the classes and variables, indentation style and so on? > > i personally prefer BSD style for indentation. naming convention for > classes and variables is not set. i agree with you that netniced needs > such a guideline, and would be happy if you contribute in that part. Well, I think (almost) any style is good as long as we will keep it consistent through all our code. BSD style is just fine for me, I would only suggest to use spaces instead of tabs - it makes code easier to print and view in different editors with different tab width settings. As for C++, I like Herb Sutter's notation described in his "[More] Exceptional C++" books - i.e. something like the following: ClassOrTypeName methodOrFunctionName variableName memberVariableName_ plain_c_variable_or_function CONSTANT_NAME TEMPLATE_PARAMETER You can find examples on Herb's web site at http://www.gotw.ca (which is an excellent resource for any C++ developer, BTW). Let me know what you guys think about it. Thank you, Sergei. |