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


当前回答

在一个名为“Bar”的类中(这是一个不具有描述性名称的UI控件),类头文件:

/// <summary>I pity the "foo".</summary>

Remove()方法:

/// <summary>A "foo" and his money are soon parted.</summary>

更糟糕的是,业务合作伙伴从生成的文档中指出了这一点。更糟糕的是,这些可能是我们从那家伙那里得到的最接近有用文件的东西。

其他回答

/**
 * Hexadecimal digit
 */
protected $version = -1;
/*
    FIXME:  why the fuck did anyone ever think this kind of expensive iteration
                    was a good idea?
// nobody read comments!
//  If you delete the credits, I will fucking kill you.

在joomla模块中找到。

/* FIXME This must absolutely be removed before 4.0.7 release
 * TODO really remove this */

我们已经发布了4.0.7,4.0.8,4.0.9和4.1版本…