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


当前回答

“这永远不会发生”。

朋友,这是我的临终遗言……

其他回答

// The following array may contain either TexturedObjects or ColoredObjects.
// I know, it sucks.
Catch (Exception e) {
 //who cares?
} 

在几年前编写Perl时,我在顶部和底部添加了这些注释:

# <magic type="voodoo">

...

# </magic>

下一个研究它的人在Perl中并不是那么热门,他花了一段时间搜索文档,看看“魔法”和“巫毒”是怎么做的。从那以后,我试着添加更多有用的评论……

 * ...and don't just declare it volatile and think you've solved
 * the problem. You young punks think you know what volatile
 * means... why in my day we had to cast it volatile uphill
 * both ways, and the code still didn't work! Whippersnappers...