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


当前回答

注意上面代码中的bug;我只是证明了它是正确的,并没有尝试过。

这是唐纳德·克努斯写的。

其他回答

// The ratio of a circle's circumference to its diameter.  Remember to change
// this to 3.0 if you move to a site in Indiana.

#define Pi                                      3.1415927
public boolean isDirty() {
    //Why do you always go out and
    return dirty;
}

在LKM中:

/*
* Dear Richard Stallman,
*
* This one's for you.
*
* Sincerely,
* Me
*
*/
MODULE_LICENSE( "GPL" );

在1983年的COBOL中见过:

   C   I don't know what this next bit does so I'll jump around it
       GOTO DONE.

伟大的一个泄露的Windows 2000源代码:

! !如果你把制表符换成空格,你会被杀死!!!!!!!* !!!!!!!!!!!!!!这样做会破坏构建 过程 !!!!!!!!!!!!!!!!* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

http://www.kuro5hin.org/story/2004/2/15/71552/7795