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


当前回答

回到《Hitchhiker’s Guide》刚问世的时候,我曾经测试过某些内容是否可滚动,以及用户是否尝试着滚动,这是一种限制可变长度的语言。所以:

if (scroll and noScroll) # or tea and no tea

其他回答

我刚刚在一些遗留代码中发现了这个..

'CANNOT JUST QUIT!
try {

} finally { // should never happen 

}

这是在PHP代码中找到的

$s=2; // chicken and bacon wrap for lunch

多么有用,幸运的是$s是不言自明的

在拉丁语中,从但丁的《神曲》中进入这里的人,请放弃希望。

    /* Mark: If there's one thing you learn from this code, it is this...
   Never, ever fly Air France.  Their customer service is absolutely
   the worst.  I've never heard the words "That's not my problem" as 
   many times as I have from their staff -- It should, without doubt
   be their corporate motto if it isn't already.  Don't bother giving 
   them business because you're just a pain in their side and they
   will be sure to let you know the first time you speak to them.

   If you ever want to make me happy just tell me that you, too, will
   never fly Air France again either (in spite of their excellent
   cuisine). 

   Update by oej: The merger with KLM has transferred this
   behaviour to KLM as well. 
   Don't bother giving them business either...

   Only if you want to travel randomly without luggage, you
   might pick either of them.
   */