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


当前回答

double penetration; // ouch

其他回答

前段时间我看到:

raise InvalidChild() # e.g. no legs

这很奇怪,因为“inwalida”在波兰语中是残疾人的意思。愚蠢的我:)

// simply copied from another code
BEGIN.
// Here might be dragons
.
.
 IF...
 // Beware of the Jabberwocky
 .//user the force, luke
 .
 .
 ENDIF.
.
END.
// TODO: what the hell is this all about?

然后一些代码被注释掉了。

这是在今天早些时候的工作代码中发现的。我不知道我该笑还是该哭……

Control + A,重写

这是在以前的项目中作为签入注释添加到源代码控制中的注释。