你遇到过的源代码中最好的注释是什么?
当前回答
来自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
*/
其他回答
目前为止最好的一个:
"This code makes baby Jesus very sad!".
它像这样引用一个String的初始化:
String blankSpaces=" "+ //100 whitespaces
" "+ //200 Whitespaces
...
" " //100 whitespaces
你懂的。
来自嵌入式系统中的电池监测模块:
// batmon.c drives the rastamobile
消毒:
//Forward declarations:
class X {}; // TODO: Remove {} ! When we get X defined....
// StupidCompilerDontInline(SCDI), in the test project where
// allcode was in a single cpp the compiler had inlined nearly
// everything which lead to nice stackoverflow.
// To prevent this the metods are made virtual
#define SCDI virtual
// drunk, fix later
真希望我是在开玩笑。根据编写代码的开发人员的了解,我认为他是认真的。
推荐文章
- Swift:理解// MARK
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?