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


当前回答

#define SHIT_HAPPENED (BASE + 1)   /* generic shit happened */

其他回答

'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
'
'  NOTE: DON'T SCREW WITH THIS CODE UNLESS YOU REALLY UNDERSTAND IT!
'
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

这是在PHP代码中找到的

$s=2; // chicken and bacon wrap for lunch

多么有用,幸运的是$s是不言自明的

/* Hammer Time! */

我不知道为什么,也不知道他在写代码时是否穿着防撕裂尼龙降落伞裤

一些来自Linux内核的代码:

/* Sun, you just can't beat me, you just can't.  Stop trying,
* give up.  I'm serious, I am going to kick the living shit
* out of you, game over, lights out.
*/

-

/* 2,191 lines of complete and utter shit coming up... */

-

#if 0 /* XXX No fucking way dude... */

这个我在Python 2.5的“twisted”包中找到的(文件是tcp.py在第371行)

# Limit length of buffer to try to send, because some OSes are too
# stupid to do so themselves (ahem windows)
return self.socket.send(buffer(data, 0, self.SEND_LIMIT))