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


当前回答

i++; // increment variable i

其他回答

在我们的应用程序中第一次重新编译FreeTextBox3,因为我们需要IE8支持…看看我发现了什么

// IE7 update. this is still bad code, but IE8 is probably a long way off :)
//When I wrote this, only God and I understood what I was doing
//Now, God only knows

刚从大学毕业的我渴望亲自动手。我的第一个任务是……“为我注释此代码”。

傻瓜。

过了一段时间我就厌倦了……

// this function doesn't actually calculated the profit, like it says --it really signals the mothership orbiting saturn that the planet is ripe for takeover

[later]

// I don't think anyone is going to read this

[various permutations on that last one]
/* Halley's comment */

在头文件的顶部:

/* 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项目”(已改名)是一个长达七年的折磨。最后这句话是由一个从头到尾都参与其中的坚定的灵魂写的。