你遇到过的源代码中最好的注释是什么?
当前回答
在linux 1.0内核调度器(schedule .c)中:
Dijkstra可能讨厌我。
/*
* 'schedule()' is the scheduler function. It's a very simple and nice
* scheduler: it's not perfect, but certainly works for most things.
* The one thing you might take a look at is the signal-handler code here.
*
* NOTE!! Task 0 is the 'idle' task, which gets called when no other
* tasks can run. It can not be killed, and it cannot sleep. The 'state'
* information in task[0] is never used.
*
* The "confuse_gcc" goto is used only to get better assembly code..
* Dijkstra probably hates me.
*/
asmlinkage void schedule(void)
(…)
其他回答
这是在PHP代码中找到的
$s=2; // chicken and bacon wrap for lunch
多么有用,幸运的是$s是不言自明的
long john; // silver
//This code sucks, you know it and I know it.
//Move on and call me an idiot later.
-- Comment this later
这是一个4000多行的PL/SQL过程的第2行。唯一的评论。手术已经进行了4年了,后来还是没来…
“这永远不会发生”。
朋友,这是我的临终遗言……