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


当前回答

// TODO: Drive an ashen stake through the foul heart of this function.

这是一个糟糕的函数。直到今天我还在做噩梦。

其他回答

从Python / ceval.c:

/* This is gonna seem *real weird*, but if you put some other code between
   PyEval_EvalFrame() and PyEval_EvalCodeEx() you will need to adjust
   the test in the if statements in Misc/gdbinit (pystack and pystackv). */

为什么你不应该将你的软件开发外包的一个经典案例:

public class Contact
{
    //...    

    /// <summary>
    /// Gets or sets the name of the first.
    /// </summary>
    /// <value>The name of the first.</value>
    public string FirstName
    {
        get { return _firstName; }
        set { _firstName = value; }
    }
}

在游戏中,这个物体可以被踩到,或者:

stepOff(); //bitch
try {
   doSomething();
} catch(err) {
   // Die quietly
   alert(err);
}
// I love the smell of dirty XML in the morning
xml = xml.Replace("xmlns=\"urn:bsd.orion/inventory\"", "");