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


当前回答

我最喜欢的是已故的Paul DiLascia:

//作者:如果这段代码工作,它是由Paul DiLascia写的。如果不是,我就不知道是谁写的了。

其他回答

我发现了这个:

I'm not sure what I did
catch (Ex as Exception)
{
     // oh crap, we should do something.
}

没有什么比一个空的catch块更能让人觉得代码是健壮的....

// Oh crap, i think i'm gonna yack

随后不久又有:

// TODO: end this lunacy

很久以前,我遇到了一些连接脚本,虽然我不记得语法,但我记得注释,因为我是平克·弗洛伊德的粉丝。

//Attempt Handshake: Hello? This is London calling. Are we reaching you?


//Handshake Failed: I don't understand...he just hung up.
// Replaces with spaces the braces in cases where braces in places cause stasis 
   $str = str_replace(array("\{","\}")," ",$str);