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


当前回答

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

其他回答

// drunk, fix later

真希望我是在开玩笑。根据编写代码的开发人员的了解,我认为他是认真的。

// This should fix something that should never happen
else
{
    //error situation
}
// The freshest corpse at the back please.
m_DeadCharacters.push_back( std::make_pair(character, 0.0f) );
// Get rid of the rotting surplus
while( m_DeadCharacters.size() > 3 )
    m_DeadCharacters.pop_front();

我最喜欢的(我必须承认我用过很多次):

// Yes...I know this is repulsive and stupid.
// But <%CompanyOwnerOrManagerToken%>, not knowing a thing about code,
// demanded I do it anyways. SO, go crap on their desk, not mine.
// K THX BYE