不可变数据是函数编程中的一个重要元素。
Immutable data is an important element of functional programming.
对不可变数据的更改包括构建数据新版本并从新版本开始工作。
Modifying immutable data consists of building a new version of the data and working from the new version.
不可变数据是许多侧重于并发性的语言的关键方面,因为它有如此好的属性。
Immutable data is a key aspect of many languages that focus on concurrency because it has such nice properties.
不可变数据是不能更改的,因此读取不可变数据无需用到锁,即使有多个线程读取时也是如此。
Immutable data cannot be changed and thus reading immutable data does not require locks, even when multiple threads are reading.
不可变数据在生产进行中必须确保完好无损,也就是不能被任何不相关的个人或集体进行删改。
Fixed data shall be protected against erasure or alteration during the manufacturing process such that it cannot be modified or deleted by an outside entity.
在考虑每个节点都是一个不可变数据结构的节点树时,我们必须考虑如何修改树内的一个节点或多个节点,而不必更改整个树。
When considering a tree of nodes where each node is an immutable data structure, we must consider how to modify a node or nodes inside the tree without modifying the entire tree.
这意味着以函数式语言编写多线程应用程序要容易得多,因为不可变数据结构与线程交互起来非常自然,因而代码可以很简洁。
This means that it is much easier to write multi-threading applications in functional languages because immutable data structures inherently interact cleanly with threads.
这意味着以函数式语言编写多线程应用程序要容易得多,因为不可变数据结构与线程交互起来非常自然,因而代码可以很简洁。
This means that it is much easier to write multi-threading applications in functional languages because immutable data structures inherently interact cleanly with threads.
应用推荐