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


当前回答

从Joomla !来源:

// fudge the group stuff

其他回答

//Maybe you should make anyone knows your code's purpose. 

来自c#中的单元测试类:

#region quis custodiet ipsos custodes?

[Fact]
public void TestPositive()
{
    Assert.Equal(4, 2 + 2);
}

[Fact]
public void TestNegative()
{
    Assert.Equal(5, 2 + 2);
}

#endregion

我在COBOL程序中看到的一些东西让我感到恐惧

* All comments pertain to the lines which follow.

这是什么意思?

有人对评论感到不舒服,以至于不得不写一个元评论? 有人习惯将注释放在相关代码的下面,而被告知要将注释放在上面?这是怎么发生的?

// Caveat implementor

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

stepOff(); //bitch