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


当前回答

const int TEN=10; // As if the value of 10 will fluctuate... 

其他回答

var arbitraryNumber = 10;
//I don't know why. Just move on.
//Mr. Compiler, please do not read this.

我记不清了,大概是这样的:

Person p = new Person("John", "Doe", "male");
Collection women = new ArrayList();
women.insert(p.getTail());

这是肮脏的代码;)

我想我有过这样的经历:


if (case1) { // trivial
...
}
else { // we are screwed
 /* fill in later */
}

好吧,我可能用了一个比搞砸更强烈的词

/* This is O(scary), but seems quick enough in practice. */ 

后面是四个嵌套的for循环