strint / sicpAns

《计算机程序的构造和解释》编程题解
167 stars 48 forks source link

page 188,注解32,允许引用损害了使用简单的方式对句子进行推理的能力。 #10

Open strint opened 9 years ago

strint commented 9 years ago

32 Allowing quotation in a language wreaks havoc with the ability to reason about the language in simple terms, because it destroys the notion that equals can be substituted for equals. For example, three is one plus two, but the word three'' is not the phraseone plus two.'' Quotation is powerful because it gives us a way to build expressions that manipulate other expressions (as we will see when we write an interpreter in chapter 4). But allowing statements in a language that talk about other statements in that language makes it very difficult to maintain any coherent principle of what equals can be substituted for equals'' should mean. For example, if we know that the evening star is the morning star, then from the statementthe evening star is Venus'' we can deduce the morning star is Venus.'' However, given thatJohn knows that the evening star is Venus'' we cannot infer that ``John knows that the morning star is Venus.''