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


当前回答

在被迫为贫血域对象编写单元测试时,这些对象不过是getter和setter的包(我也是被迫写的):

// zzzzZZZZzzzz....

其他回答

这比你在许多评论标题中看到的可怕的法律通知和免责声明要好得多。从SQLite。

/*
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
*/
#pragma region Crap that is kept for temporary reasons

    //  Huge chunk of commented code

#pragma endregion

我刚刚在一些遗留代码中发现了这个..

'CANNOT JUST QUIT!
//Woulda
if(x) {}
//Shoulda
else if(y) {}
//Coulda
else {}
var arbitraryNumber = 10;
//I don't know why. Just move on.