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


当前回答

def leppard
# what, i cant have my own convention?
end

其他回答

// this error could never happen

然后,客户打电话说他看到一条错误消息说"这个错误永远不会发生"

public static final void attachListener(Object listener) {

/* ======================= */

// This does nothing, continue searching

/* ======================= */

...

与听众一起痛苦!

#pragma region Crap that is kept for temporary reasons

    //  Huge chunk of commented code

#pragma endregion
//Dear future me. Please forgive me. 
//I can't even begin to express how sorry I am.  

我今天刚发现了这个:

//private instance variable for storing age
public static int age;

当我注释掉我认为不再有用的代码块,但我可能是错的(因此没有删除它们),我有时会在它们之前

// Wilted celery?

这个想法就像芹菜一样枯萎了,但你还是把它放回冰箱里。我只知道十年后会有人看到这些评论,说什么鬼?