解决方法
为了在Common Lisp中使用它们,请参阅Rainers的详细答案。简要总结一下:
form的HyperSpec条目:
form n. 1. any object meant to be evaluated. 2. a symbol,a compound
form,or a self-evaluating object. 3. (for an operator,as in
<<operator>> form'') a compound form having that operator as its
A quote form is a constant form.”
first element.
expression的HyperSpec条目:
expression n. 1. an object,often used to emphasize the use of the
object to encode or represent information in a specialized format,
such as program text.The second expression in a let form is a list
The expression ‘sample is equivalent to (quote
of bindings.'' 2. the textual notation used to notate an object in a
source file.
sample).”
因此,根据HyperSpec,表达式用于(文本)表示,而表单用于要评估的Lisp对象。但是,如上所述,这只是在HyperSpec(因此Common Lisp)的上下文中这些术语的定义。
然而,在计划中,R5RS根本就没有提及形式,仅谈论表达。 R6RS甚至给出了一个几乎听起来像上面正好相反的定义:
At the purely syntactical level,both are forms,and form is the
general name for a syntactic part of a Scheme program.
(谈论(定义…)和(* …)之间的区别。)