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


当前回答

#pragma region Crap that is kept for temporary reasons

    //  Huge chunk of commented code

#pragma endregion

其他回答

我告诉学员至少做一些异常处理。这是我在每一个db调用....返回

Catch (Exception e) {
    //eat it
}
Case 1:
   ...
   break;
   ...
//I don't want do do this but [my coworker] says it's part of the code standard
default:
   break;
/* Jeez, this is an ugly mess */

...comment from the X11R6 internals source code circa 1991.

注意上面代码中的bug;我只是证明了它是正确的,并没有尝试过。

这是唐纳德·克努斯写的。

i++; // increment variable i