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


当前回答

/*
* TODO: Remove this function

function remove($customer_id)
    {
        $this->Customer->remove($id);
    }

*/

其他回答

//marco 2007.1.23
//I didn't do it
// Hard to explain

它最后也坏了。难怪很难解释清楚

我经常看到这种情况:

// TODO make this work
REM Don't delete this print statement ****** will die

所讨论的流程是一些遗留代码中的服务

我在重用我很久以前写的一个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;
}