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


当前回答

int main(void)
/* Program starts here */

其他回答

<cftry>
...code...
<cfcatch>
  <!--- Gobble --->
</cfcatch>
<cftry>

我公司的代码库里到处都是。它是ColdFusion,它会忽略错误。

catch (Ex as Exception)
{
     // oh crap, we should do something.
}

没有什么比一个空的catch块更能让人觉得代码是健壮的....

catch (Domain.ConcurrencyException)
{
    // somebody changed it between the time we loaded it and now.
    // weird, huh?
}
{
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]
}

//把这个放在这里的人是个白痴…这根本不管用!

但是代码还在那里……