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


当前回答

# To understand recursion, see the bottom of this file 

在文件的底部:

# To understand recursion, see the top of this file

其他回答

我最喜欢的评论是我的一个同性恋朋友说的。他喜欢用VB标记他所有的TODO注释。净,

'TODO: Matt Damon

有时会提供额外的信息,但通常不是这样。

大约1997年,Netscape网络浏览器的UNIX风格的源代码:

/* HP-UX sucks wet farts from dead pigeons' asses */

不幸的是,在Moz开源之前,这些珍珠被移除了……

' Oh man I'm pissed. I think I better go home.

哪里喝醉了

// Added because boss changed his mind : 20020111,20020501,20020820, ...
// Commented out because boss changed his mind : 20020201,20020614,20020908, ...

在ETL脚本之间的主要黑客RPG数据库和SQL Server一个。我大概有10到20次这样的评论……

// Oh crap, i think i'm gonna yack

随后不久又有:

// TODO: end this lunacy