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


当前回答

// No women, no children... What movie???

其他回答

在几年前编写Perl时,我在顶部和底部添加了这些注释:

# <magic type="voodoo">

...

# </magic>

下一个研究它的人在Perl中并不是那么热门,他花了一段时间搜索文档,看看“魔法”和“巫毒”是怎么做的。从那以后,我试着添加更多有用的评论……

// Replaces with spaces the braces in cases where braces in places cause stasis 
   $str = str_replace(array("\{","\}")," ",$str);

大概30页的xslt的中间部分

<!-- Here be dragons  -->
// 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次这样的评论……

/* Please work */