你遇到过的源代码中最好的注释是什么?
当前回答
//MailBody builders for two outgoing messages
StringBuilder hanz = new StringBuilder();
StringBuilder franz = new StringBuilder();
当我读到这篇文章时,我仍然会笑出声来……
其他回答
我曾经见过这个:
//this used to be a comment
public function get state( /* of Palestine back */ ):Boolean
// long live COM'n'Roll
public enum StatusCode
{
//success codes
S_OK = 1,
S_NONE = 2,
S_SQL_OPERATIONS_LISTS_EMPTY = 3,
//error codes
E_NO_MATCHING_END_FOUND = -1,
E_SEQUENCE_NUMBER_NOT_FOUND_AT_BEGINNING = -2,
E_SEQUENCE_NUMBER_NOT_FOUND_AT_END = -3,
E_FORWARD_AND_BACKWARD_OPS_COUNT_DO_NOT_MATCH = -4,
E_FORWARD_AND_BACKWARD_IDS_DO_NOT_MATCH = -5,
E_IDS_DO_NOT_MATCH = -6
}
aComment = 'this is not aComment' # this is aComment
class T(object):
def f(this):
this is not aComment
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
'
' NOTE: DON'T SCREW WITH THIS CODE UNLESS YOU REALLY UNDERSTAND IT!
'
'""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""