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


当前回答

在LucasArts的电脑游戏《the Eidolon》(游戏邦注:这款游戏本身就很古怪)的源代码中可以看到……

// He's dead, Jim!

其他回答

用VB写的很好。我今天早上跑进了NET,得到了一个笑声…

''' <summary>
''' Represents an exception that was logged.  Since System.Exception implements IDictionary, it can't be
''' serialized, so I had to write this.  Pretty fucking stupid thing to have to do, System.Exception should
''' be serializable right out of the box, IMHO.
''' </summary>
''' <remarks></remarks>
Public Class LogException
aComment = 'this is not aComment' # this is aComment
class T(object):
    def f(this):
        this is not aComment
if(m_measures =/*=*/ --index)
{
    ....
catch (Ex as Exception)
{
     // oh crap, we should do something.
}

没有什么比一个空的catch块更能让人觉得代码是健壮的....

Case 1:
   ...
   break;
   ...
//I don't want do do this but [my coworker] says it's part of the code standard
default:
   break;