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


当前回答

我最喜欢的是一个用java编写的学校项目的一些业务逻辑中的一个变量名。

int StupidJava = -1;

其他回答

来自一个显然在看巨蟒剧团的小伙子:

> //现在,for something完全 > // different: 类theLarch {

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

# <magic type="voodoo">

...

# </magic>

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

/*************************** Drag And Drop Section - Start (you should be me to mess with this section)*********************************************/

经典ASP:

'Is it worth it, let me work it'
'I put my thing down, flip it and reverse it'
'Ti esrever dna ti pilf, nwod gniht ym tup I'

NextIP = StrReverse(UserRecordset.Fields.Item(0))
// this is really complicated

没有其他评论了