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


当前回答

... 或者去死//婊子

其他回答

这是我今天重构一些代码时发现的一条评论

if( year < 100 ): year += 2000 #lol, Y2K
// woot, global var. I havent done this for a long time.
// (c) 2000 Applied Magic, Inc.
// Unauthorized use punishable by torture, mutilation, and vivisection.

啊,我一直很喜欢这个……

这比你在许多评论标题中看到的可怕的法律通知和免责声明要好得多。从SQLite。

/*
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
*/

在一个生成HTML的旧perl脚本中找到:

# I would be _very_ brain farting if I said this code didn't need reviewing.
# It will make babies cry, and hair grow on your back, so please don't use it