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


当前回答

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

其他回答

在初始化链表时:

last = first; /* Biblical reference */

简洁而滑稽。

下面是一个必须声明的局部变量,只是为了将一个常量传递给库函数:

// This only exists because Scott doesn't know how to use const correctly
// Added because boss changed his mind : 20020111,20020501,20020820, ...
// Commented out because boss changed his mind : 20020201,20020614,20020908, ...

在ETL脚本之间的主要黑客RPG数据库和SQL Server一个。我大概有10到20次这样的评论……

// StupidCompilerDontInline(SCDI), in the test project where
// allcode was in a single cpp the compiler had inlined nearly
// everything which lead to nice stackoverflow.
// To prevent this the metods are made virtual
#define SCDI virtual

我没有这个来源的副本,但我一直记得它:

//如果你想不明白,就不要读这篇文章