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


当前回答

// insert comment here

其他回答

从Joomla !来源:

// fudge the group stuff
public GetRandomNumber()
{
    // Chosen by a fairly rolen dice
    return 12;
}

在给一个朋友看了这篇来自《Coding Horror》的文章几个小时后,我看到了他对代码的评论:

// valdez先生是一个暴力的精神病患者。别惹他生气。

在OLTP数据库事务的主要触发代码中找到:

-- This line negates the @inverseqty, which is the
-- negative of the @insertedquantity.  This works through the
-- magic of the trigger.  In fact, this code is a lot like
-- the bermuda triangle!
@negquantity = -1 * @inverseqty
/* This is O(scary), but seems quick enough in practice. */ 

后面是四个嵌套的for循环