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


当前回答

//你不需要理解这个

经典。

其他回答

我经常看到这种情况:

// TODO make this work
//marco 2007.1.23
//I didn't do it

这个我在Python 2.5的“twisted”包中找到的(文件是tcp.py在第371行)

# Limit length of buffer to try to send, because some OSes are too
# stupid to do so themselves (ahem windows)
return self.socket.send(buffer(data, 0, self.SEND_LIMIT))

我想我有过这样的经历:


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

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

今天刚加了这个:

// Hardcoded this for time sake ... will make andrew fix later :)