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


当前回答

// 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();

其他回答

回到《Hitchhiker’s Guide》刚问世的时候,我曾经测试过某些内容是否可滚动,以及用户是否尝试着滚动,这是一种限制可变长度的语言。所以:

if (scroll and noScroll) # or tea and no tea

//把这个放在这里的人是个白痴…这根本不管用!

但是代码还在那里……

注意上面代码中的bug;我只是证明了它是正确的,并没有尝试过。

这是唐纳德·克努斯写的。

THIS PROGRAM HAS CODE THAT DOES NOT MEET STANDARDS      

这个评论几乎出现在我们这里的每一个节目中....

从谷歌代码项目:

# This job would be great if it wasn't for the fucking customers.