你遇到过的源代码中最好的注释是什么?
当前回答
// This code sucks.
其他回答
我曾经参与过Windows 3.0的源代码。(我赶紧补充一句,作为一名微软员工,不是!)在那里,我遇到了一个文件加载器,它可以多次重新输入,并且有一个讨厌的双关语的例子(只是为了显示作者有多聪明)。
这些乱七八糟的可重入代码是用Intel程序集jmp指令(在C代码中间)执行的,它的标签是“we_are_not_in_kansas_any_more_toto”。
'Major changes: Everthing! - Removed all Cornoud's code !
我喜欢GNU双utils中的一些注释。这个来自BFD som.c:
/* You'll never believe all this is necessary to handle relocations
for function calls. Having to compute and pack the argument
relocation bits is the real nightmare.
If you're interested in how this works, just forget it. You really
do not want to know about this braindamage. */
这个也是:
/* Don't ask about these magic sequences. I took them straight
from gas-1.36 which took them from the a.out man page. */
...
/* Keep track of exactly where we are within a particular
space. This is necessary as the braindamaged HPUX
loader will create holes between subspaces *and*
subspace alignments are *NOT* preserved. What a crock. */
另一个:
/* We will NOT put a fucking timestamp in the header here. Every
time you put it back, I will come in and take it out again. ... */
从气体:
/* Yes this is ugly (storing the broken_word pointer
in the symbol slot). Still, this whole chunk of
code is ugly, and I don't feel like doing anything
about it. Think of it as stubbornness in action. */
/* Hammer Time! */
我不知道为什么,也不知道他在写代码时是否穿着防撕裂尼龙降落伞裤
// good luck!
推荐文章
- 在构建中编写注释的语法是什么?gradle文件?
- Java注释中的/**和/*
- 有没有办法注释掉.ASPX页面中的标记?
- Jenkins:注释可以添加到Jenkins文件中吗?
- TypeScript注释的语法记录在哪里?
- CSV文件可以有注释吗?
- 什么是自文档化代码?它能取代文档化良好的代码吗?
- 在erb中添加注释的最佳方法
- 为什么Python没有多行注释?
- 我应该在批处理文件中使用哪种注释风格?
- 如何在Office VBA编辑器中注释和取消注释代码块
- “# noqa”在Python注释中是什么意思?
- 我可以向pip需求文件添加注释吗?
- 你遇到过的源代码中最好的注释是什么?
- 在Bash中创建多行注释的方法?