ReferencesSide effectIn particular, besides just yielding results, evaluation of terms in these languages may assign to mutable variables (reference cells, arrays, mutable record fields, etc.), perform input and output to files, displays, or network connections, make non-local transfers of control via exceptions, jumps, or continuations, engage in inter-process synchronization and communication, and so on. In the literature on programming languages, such “side effects” of computation are more generally referred to as computational effects.引用指向的对象可以是基本类型、组合类型,甚至是函数,把指向函数的ref放进对应的record,就变成一个简单的
...
继续阅读
(18)