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


当前回答

try {

}
catch (SQLException ex) {
    // Basically, without saying too much, you're screwed. Royally and totally.
}
catch(Exception ex)
{
    //If you thought you were screwed before, boy have I news for you!!!
}

其他回答

//uncomment the following line if the program manager changes her mind again this week

唐纳德·克努斯的另一个经典作品:

注意上面代码中的bug; 我只是证明了它是正确的,并没有尝试过。

//Abandon all hope ye who enter beyond this point
catch (Ex as Exception)
{
     // oh crap, we should do something.
}

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

// If this comment is removed the program will blow up