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


当前回答

我曾经在一个项目中发现了这样的评论:

// Cabbage fart?

我不知道那是什么意思。还好我的魔方不在写它的人旁边。

其他回答

// no comments for you
// it was hard to write
// so it should be hard to read
// TODO: Implement this function!
// If this comment is removed the program will blow up 

在被迫为贫血域对象编写单元测试时,这些对象不过是getter和setter的包(我也是被迫写的):

// zzzzZZZZzzzz....
// Any maintenance developer who can't quote entire Monty Python
// movies from memory has no business being a developer. 
const string LancelotsFavoriteColor = "$0204FB"