Re: [Netnice-developer] Coding conventions
Status: Alpha
Brought to you by:
taost6
From: Takashi O. <ta...@cs...> - 2003-11-11 05:17:46
|
hello, Sergei Matusevich wrote: > > 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. hmm. i think most of the kernel source code is written with tab, and i basically prefer their style for indentation. i'm using emacs and vi, but, have not had such trouble... > 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 this looks reasonable to me. thanks! -- taka |