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


当前回答

用VB写的很好。我今天早上跑进了NET,得到了一个笑声…

''' <summary>
''' Represents an exception that was logged.  Since System.Exception implements IDictionary, it can't be
''' serialized, so I had to write this.  Pretty fucking stupid thing to have to do, System.Exception should
''' be serializable right out of the box, IMHO.
''' </summary>
''' <remarks></remarks>
Public Class LogException

其他回答

//Not a bug, parameter position can change..., if you think this is wrong, you are in fact wrong.

在头文件的顶部:

/* Project : XYZ (Please somebody shoot me!)
 *
 * File : $Id: defs.h,v 1.1 $
 *
 * Purpose : Create havoc rather than peace among many nations
 *
 * History : Back-ported changes that were not in CVS.  Please somebody,
 *  shoot us and put us all out of our misery.
 */

“XYZ项目”(已改名)是一个长达七年的折磨。最后这句话是由一个从头到尾都参与其中的坚定的灵魂写的。

// This is a walkaround for bug #7812

是我们的一个中国程序员写的,他的第一语言不是英语。

我真的很喜欢这个。我碰巧认为“walkaround”几乎比“workaround”更好。

stop(); // Hammertime!

在游戏中,这个物体可以被踩到,或者:

stepOff(); //bitch