Posts: 32 / Nickname: cda / Registered: February 11, 2003 0:06 PM
C++ Coding Standards
November 19, 2004 3:00 PM
|
Two leading C++ experts present hard-won wisdom for the entire C++ development experience.
Read this excerpt form their new book: http://www.artima.com/cppsource/codestandards.html |
Posts: 20 / Nickname: bigboy / Registered: June 14, 2004 10:43 AM
Re: C++ Coding Standards
November 19, 2004 9:09 PM
|
Guys
As I mentioned in the review phase, I disagree with the monotonicity of the unused parameter item. I can now avail myself of the underhanded option of repeating myself in this public forum, and I find myself unable to resist. ;) Many developers are diligently using automatic documentation tools, which can be stymied by an anonymous function parameter, and produce warnings of their absence. Since documentation tools may form an important part of an automated build process, it behooves us to get no warnings in that phase, as in any other. Hence, I believe the best, although perhaps not the most beautiful, approach is to do the following:
In this way, we placate the compiler and the documentation generator, and also provide what I'd argue is a more obvious mnemonic to maintainers of the code that we know the argument is unused and we're ok with that. :-) Matthew |