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


当前回答

class Act //That's me!!!
{

}

其他回答

# To understand recursion, see the bottom of this file 

在文件的底部:

# To understand recursion, see the top of this file

我只是在我自己的代码中遇到了这个问题。它在一个用于类别选择的洋红色管理模板中:

        /*
         * OK; before you read the following code know what I am trying to do.
         * I needed to get the list of child catagories from the root node so that
         * the root node didn't appear in the selection box. But for some stupid
         * fucking reason the stupid fucking DBA wont let me access the items using
         * indicies and I instead have to use their stupid fucking Iterator
         * implementation. So there.
         */
        $firstList = $this->getRootNode()->getChildren();
        foreach ($firstList as $node)
        {
            $nodes = $node->getChildren();
            break;          // wtf?
        }

我要把语言从我们的旗舰产品中移除;但我记得我非常沮丧。如果我没有留下评论,我会试着修改它,但会遇到和以前一样的问题。

我所见过的最好的评论是

/* 
  There is no accounting for pointers 
*/

摘自UNIX版本6源代码,大约1975年:

/* You are not expected to understand this. */
public function get state( /* of Palestine back */ ):Boolean