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


当前回答

'Do not optimize these next two lines. Compiler bugs lurk.

他们做到了。将变量压缩到第二行表达式中会导致跳到堆中间并尝试执行数据。

其他回答

我最喜欢的是这样的

 # commented out
 ...
 ### end of the formerly uncommented #2001-02-22 John Doe
// TODO: Implement this function!

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

傻瓜。

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

// 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]
int Q13Factor = 8125; // 2^13 for Q13 
/* Hammer Time! */

我不知道为什么,也不知道他在写代码时是否穿着防撕裂尼龙降落伞裤