commenting style

Started by
11 comments, last by Arild Fines 17 years, 8 months ago
Quote:Original post by OluseyiFortunately, Visual Studio will gladly maintain header files for you when you change function signatures.

Really? I have no idea how to use this functionality, what's it called?
Thanks.
Advertisement
Ideally, the function declarations in headers shouldn't need comments, because the function names should make it plenty obvious what the function basically does.

Trying to manually keep source and header comments in sync is not really a long term workable strategy.

Source function comments should add details, and mention any idiosyncracies or explanations for unusual approaches or implementations.

Source function comments should not provide rendundant information like the class or function name.

I use this style for function headers, as it visually clearly delineates between functions, and it's Doxygen compatible:

////////////////////////////////////////////////////////////////////////////////*!    If we've got a full read buffer, transfer the data into one of oursound buffers.*////////////////////////////////////////////////////////////////////////////////void cStreamingSound::TransferFinishedData(void){ // ...}



Visual Assist is an essential tool.
Quote:Original post by adam23
what do you mean by navigating your class space?

This is how *I* navigate my "class space".

--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]

This topic is closed to new replies.

Advertisement