scheme - SICP 术语 : difference between procedure and operation

标签 scheme lisp terminology sicp

术语“过程”是否与 SICP 中的术语“操作”同义? (例如在下面的章节中。)如果它们不一样,有什么区别,为什么?

更具体地说,“复合操作”和“复合过程”有什么区别?有没有 ?

SICP Chapter 1.1.4 Compound Procedures

这是本书的其他相关章节:

SICP Chapter 1.2 Procedures and the Processes They Generate

在我看来,在这些上下文中,SICP 中的术语“运算”指的是算术运算(因为到目前为止,示例中没有使用其他类型的运算 - 无论它们通常是什么)。

最佳答案

一个“操作”,无论是原始的还是复合的,都是一些实际的计算,比如加法,比如在编译程序的汇编代码中,就像数字是一个实际的计算对象,计算机内存中的一个实体。

“过程”是编程语言的一部分,用于表达/描述操作。编程语言可以让我们定义表达一些原始操作的过程,并通过组合它们来表达一些更复杂的操作:

(define (sum x y) (+ x y))   ; a procedure expressing  primitive operation

(define (sum-squares x y)    ; a procedure describing a more complex operation
    (+ (* x x) (* y y)))     ;  defined by means of combining the operations

关于scheme - SICP 术语 : difference between procedure and operation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25389640/

相关文章:

file-io - Scheme 中的文件统计

Emacs LISP - DeMorgan'ify 列表

Clojure 字符串返回值

lisp - 允许将特殊形式视为正常值会产生什么后果?

c - 当一个函数被另一个函数调用时,它的技术术语是什么?

lambda - 什么是 lambda(函数)?

algorithm - 如何平树?

scheme - 在 Racket 中实现 for 循环

scheme - 在Scheme中,什么时候理性谓词会产生假?

python - "Never invent such names; only use them as documented."谁?