你遇到过的源代码中最好的注释是什么?


当前回答

http://fxr.watson.org/fxr/source/pci/if_rl.c 是好的来源。

其他回答

我只是在一个非常简单的大学课程测试c++程序中碰到了这个。

我在评论一个类。

在析构函数中…

// Choose! Choose the form of the Destructor!
// The choice is made! The Traveler has come!
// I am not sure if we need this, but too scared to delete. 
// HACK ! COPY/PASTE this and look for another job
//too much log will kill you

这个评论是我自己写的,当降低一些日志的优先级时,否则会写数百MB的垃圾,严重削弱应用程序的性能。

// TODO - Comment this function