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


当前回答

在一个巨大的800行'switch'语句中,在中间的某处:

// Joe is sorry

几百行之后……

// Harry is sorry too

其他回答

i++; // increment variable i
// Keep prozac ready if things get ugly!

下面是一个必须声明的局部变量,只是为了将一个常量传递给库函数:

// This only exists because Scott doesn't know how to use const correctly
//I am not sure why this works but it fixes the problem. 

这是之前的一组代码,技术上确实解决了问题,它的意思是,但打破了其他3个东西....

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

后面是四个嵌套的for循环