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


当前回答

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

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

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

其他回答

 * ...and don't just declare it volatile and think you've solved
 * the problem. You young punks think you know what volatile
 * means... why in my day we had to cast it volatile uphill
 * both ways, and the code still didn't work! Whippersnappers...

我没有这个来源的副本,但我一直记得它:

//如果你想不明白,就不要读这篇文章

从2004年的Windows泄露事件来看,

__inline BOOL
SearchOneDirectory(
                  IN  LPSTR Directory,
                  IN  LPSTR FileToFind,
                  IN  LPSTR SourceFullName,
                  IN  LPSTR SourceFilePart,
                  OUT PBOOL FoundInTree
                  )
{
    //
    // This was way too slow. Just say we didn't find the file.
    //
    *FoundInTree = FALSE;
    return(TRUE);
}
// if the resultMap size is less than or equal to zero
// then the product is added
if (resultMap.size() <= 0)

... 或者去死//婊子