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


当前回答

我不止一次使用过这个方法,当我对一个数学公式做了一些不明显的简化时,我不想记录:

//this formula is right, work out the math yourself if you don't believe me

其他回答

//I'm sorry, but our princess is in another castle.

在js代码中:

// hack for ie browser (assuming that ie is a browser)

我刚刚注意到自己在写这个

// not brilliant solution, but fair enough heh.
// set break point here - you'll never reach it

在头文件的顶部:

/* Project : XYZ (Please somebody shoot me!)
 *
 * File : $Id: defs.h,v 1.1 $
 *
 * Purpose : Create havoc rather than peace among many nations
 *
 * History : Back-ported changes that were not in CVS.  Please somebody,
 *  shoot us and put us all out of our misery.
 */

“XYZ项目”(已改名)是一个长达七年的折磨。最后这句话是由一个从头到尾都参与其中的坚定的灵魂写的。