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


当前回答

// This is a walkaround for bug #7812

是我们的一个中国程序员写的,他的第一语言不是英语。

我真的很喜欢这个。我碰巧认为“walkaround”几乎比“workaround”更好。

其他回答

在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->getSelect()->where ('main_table.product_id = -1'); // Mom, Dad... sorry
/* This is O(scary), but seems quick enough in practice. */ 

后面是四个嵌套的for循环

/* Halley's comment */

其中最经典的是皮埃尔·德·费马对他著名的“大定理”所作的评论:“这一页的空白处太小了,无法写下证明。”

350多年后才找到证据。

(根据维基百科,这是原文:)

Cubum autem在双cubos, aut 二元象限 象限,和将军 无限超quadratum中的一无所有 在两种情况下 我们是恶魔 米拉比林健康。Hanc marginis exiguitas不是caperet。

...并翻译成英语:

(把立方体分开是不可能的 化成两个立方,或者化成四次方 2 / 4次方,或者一般来说,任意 幂大于二成二 喜欢权力。我发现了一个真正的 这是一个绝妙的证明 边际太窄,无法容纳。)