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


当前回答

try {
  dataSource.close();
}
catch (SQLException ex) {
  // Do nothing, since we're going to trash this anyway
}

当然,这类事情实际上是JDBC(或者至少是Oracle的JDBC驱动程序)中的wtf,因为它可以在关闭连接时抛出SQLExceptions…

其他回答

// BEGIN HACK
...
// END HACK: I feel dirty.

大约1997年,Netscape网络浏览器的UNIX风格的源代码:

/* HP-UX sucks wet farts from dead pigeons' asses */

不幸的是,在Moz开源之前,这些珍珠被移除了……

catch (Domain.ConcurrencyException)
{
    // somebody changed it between the time we loaded it and now.
    // weird, huh?
}

一段时间前我在一个PHP CMS中添加的注释。

if (/*you*/ $_GET['action']) { //celebrate
// TODO: Implement this function!