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


当前回答

我在COBOL程序中看到的一些东西让我感到恐惧

* All comments pertain to the lines which follow.

这是什么意思?

有人对评论感到不舒服,以至于不得不写一个元评论? 有人习惯将注释放在相关代码的下面,而被告知要将注释放在上面?这是怎么发生的?

其他回答

我经常发现这个

// fix it!
// (c) 2000 Applied Magic, Inc.
// Unauthorized use punishable by torture, mutilation, and vivisection.

啊,我一直很喜欢这个……

// Fuck.

,……

// This code worked before, but my cat decided to take a trip across my keyboard...
def leppard
# what, i cant have my own convention?
end

我一直很喜欢Paul DiLascia在他的文件头中写的:

// If this code works, it was written by Paul DiLascia. If not, I don't know
// who wrote it