The original Fortran III specification document, a technical paper disseminated in the Winter of 1958, describes some very explicit additions to the Fortran II language, including ... inline assembly.
我认为它是关于混合数字和逻辑值,这仍然可以在流行的结构中看到,可能起源于 Fortran,例如 while (1)。有很多“聪明”的 C 算法,它们依赖于这样一个事实:0 是假的,而其他所有值都不是。
这同样适用于 API 调用,例如在 POSIX 或 Linux 内核中,其中一些在失败时返回 0,而另一些则返回 -1(有一个经验法则,何时应用哪个,但这只是民间传说,所以通常是这样)破碎的)。考虑到麦卡锡时代这些东西还没有发展起来,你甚至可以在这里看到他的“预言”力量。
I think it is about mixing numerical and logic values, which can still be seen in popular constructs, probably originated in Fortran, like while (1). There are a lot of "clever" C algorithms, that rely on the fact, that 0 is false and every other value isn't.
The same applies at large to API calls, like in POSIX or Linux kernel, some of which return 0 on failure, while some -1 (there's a rule of thumb, when to apply which, but it is just folklore, so often it is broken). Considering the fact, that at McCarthy's time, those things weren't developed yet, you can see his "prophetic" power even here.
发布评论
评论(5)
因为
0==()
自 1958 年以来一直是色情内容的表情符号。现在你知道了。
because
0==()
has been the emoticon for pornography since 1958.Now you know.
事实上,太多的实现细节在更高级别上泄露,即显示太多
The fact that too many implementation details were leaking at a higher level, i.e. showing up too much
最初的 Fortran III 规范文档是 1958 年冬天发布的一篇技术论文,描述了对 Fortran II 语言的一些非常明确的补充,包括……内联汇编。
PDF 文档位于此处。
对“附加内容”的诱人描述如下:
一些禁忌代码是
神秘的是,Fortran-III 是从未向公众发布 (见第 5 节。),但它以有限的方式传播,然后悄然消失。
The original Fortran III specification document, a technical paper disseminated in the Winter of 1958, describes some very explicit additions to the Fortran II language, including ... inline assembly.
The PDF document is here.
A tantalizing description of the "additions" follows:
Some taboo code is
Mysteriously, Fortran-III was never released to the public (see section 5.), but it was disseminated in a limited fashion before quietly fading away.
我认为它是关于混合数字和逻辑值,这仍然可以在流行的结构中看到,可能起源于 Fortran,例如
while (1)
。有很多“聪明”的 C 算法,它们依赖于这样一个事实:0 是假的,而其他所有值都不是。这同样适用于 API 调用,例如在 POSIX 或 Linux 内核中,其中一些在失败时返回 0,而另一些则返回 -1(有一个经验法则,何时应用哪个,但这只是民间传说,所以通常是这样)破碎的)。考虑到麦卡锡时代这些东西还没有发展起来,你甚至可以在这里看到他的“预言”力量。
I think it is about mixing numerical and logic values, which can still be seen in popular constructs, probably originated in Fortran, like
while (1)
. There are a lot of "clever" C algorithms, that rely on the fact, that 0 is false and every other value isn't.The same applies at large to API calls, like in POSIX or Linux kernel, some of which return 0 on failure, while some -1 (there's a rule of thumb, when to apply which, but it is just folklore, so often it is broken). Considering the fact, that at McCarthy's time, those things weren't developed yet, you can see his "prophetic" power even here.
也许这是他谈论空引用的方式:十亿美元的错误(T. Hoare)。
Perhaps it was his way of talking about null references: the billion dollar mistake (T. Hoare).