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


当前回答

来自Linux内核源代码:

linux /包括/ asm-i386 / hw_irq。h:

/*
 * subtle. orig_eax is used by the signal code to distinct between
 * system calls and interrupted 'random user-space'. Thus we have
 * to put a negative value into orig_eax here. (the problem is that
 * both system calls and IRQs want to have small integer numbers in
 * orig_eax, and the syscall code has won the optimization conflict ;)
 *
 * Subtle as a pigs ear.  VY
 */

其他回答

最近在我们的代码中发现了这一点(我们开发企业软件):

// Instance of excel
Excel excel = this.CreateExcelInstance();
excel.Open(stream); // how to close it?!

在此之前,我确信我们已经摆脱了这些“有趣的东西”,我们正在以正确的、意识形态正确的方式做这件事……

// If I from the future read this I'll back in time and kill myself. 

... 或者去死//婊子

/**
 * This run through all the guipublisherbuyRecord , the records those have
 * diff. is buytotal and prior to buy isRecommendedBillingClickedWarning flag
 * is set if priously RB ran and this time not.
 * 
 * --What?
 * 
 * @return
 * @throws AppException
 */

摘自UNIX版本6源代码,大约1975年:

/* You are not expected to understand this. */