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


当前回答

在初始化链表时:

last = first; /* Biblical reference */

简洁而滑稽。

其他回答

在PeopleSoft Financials PeopleCode的早期版本中:

/* I don't know how you can ever get here so I'll have to fix it later */

Dennis M Ritchie在这里有一个关于一些古老UNIX注释的页面

// TODO: Implement this function!
{
This is a gathering place for all unit tests.
Create a TUnitTestWrapper, then call "RunAllUnitTests".

This class will create an instance of each thing to be tested, and call each of
their unit tests.

It does not really do any testing on it's own; it just gives a common place from
which to call everyone else's tests.

This way, one day, we can automate our testing with each build. [Cue laughter]
}

消毒:

//Forward declarations:

class X {}; // TODO: Remove {}  ! When we get X defined....