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


当前回答

我在重用我很久以前写的一个PHP类时发现了这一点。我仍然不记得那里有什么,我仍然发现它没有任何用处……我甚至不记得我写过那篇评论;所以当我找到它的时候,我真的笑出声来了。

try
{               
    // Some database logic
}
catch (Exception $ex)
{
    // sure, it looks silly and I honestly cant remember what code used to go here... but i swear i will
    // find a use for this code.... eventually....
    throw $ex;
}

其他回答

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

但是代码还在那里……

// TODO: Implement this function!

大概30页的xslt的中间部分

<!-- Here be dragons  -->
// sometimes I believe compiler ignores all my comments
//I am not sure why this works but it fixes the problem. 

这是之前的一组代码,技术上确实解决了问题,它的意思是,但打破了其他3个东西....