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


当前回答

// simply copied from another code

其他回答

这实际上是我在实现原型转换为实际代码时所做的:

// Abandon all hope you who needs to debug this

是的,有比我聪明的人在之后重构了代码(它必须有一个好的结局)。

我最喜欢的是这样的

 # commented out
 ...
 ### end of the formerly uncommented #2001-02-22 John Doe
// fix for groupid > 9 
// if groupid ever gets to 100 everything will break (again)

if (groupid < 10) {
groupid = "0" + groupid;
}
// this is really complicated

没有其他评论了

我不止一次使用过这个方法,当我对一个数学公式做了一些不明显的简化时,我不想记录:

//this formula is right, work out the math yourself if you don't believe me