你遇到过的源代码中最好的注释是什么?
当前回答
$you = live("free") or die("hard");
其他回答
我最喜欢的是已故的Paul DiLascia:
//作者:如果这段代码工作,它是由Paul DiLascia写的。如果不是,我就不知道是谁写的了。
在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)
(…)
* ...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...
return 1; # returns 1
用VB写的很好。我今天早上跑进了NET,得到了一个笑声…
''' <summary>
''' Represents an exception that was logged. Since System.Exception implements IDictionary, it can't be
''' serialized, so I had to write this. Pretty fucking stupid thing to have to do, System.Exception should
''' be serializable right out of the box, IMHO.
''' </summary>
''' <remarks></remarks>
Public Class LogException