Immutable data is an important element of functional programming.
不可变数据是函数编程中的一个重要元素。
Collection types for working with immutable data, including list and sequence types.
与不可变资料搭配使用的集合型别,包括清单和序列型别。
The last advice on protecting sensitive data is to avoid using immutable data types like String.
最后的建议是关于保护敏感数据的,就是要避免使用不可变的数据类型,比如string。
In functional programming, you think of immutable data structures and functions that convert them.
在函数式编程当中你想的是不变的数据结构以及那些转换它们的函数。
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.
不可变数据是许多侧重于并发性的语言的关键方面,因为它有如此好的属性。
Because Clojure trees are immutable data structures, any manipulation requires that we return a new, modified tree.
由于clojure树是不可变的数据结构,因此任何操作都需要返回一个经过修改的新树。
All literals correspond to immutable data types, and hence the object's identity is less important than its value.
所有字面值都属于不可变的数据类型,因此对象的标识比起它们的值来说显得次要一些。
Immutable data cannot be changed and thus reading immutable data does not require locks, even when multiple threads are reading.
不可变数据是不能更改的,因此读取不可变数据无需用到锁,即使有多个线程读取时也是如此。
The values of a dictionary can be of any type, but the keys must be of an immutable data type such as strings, Numbers, or tuples.
字典的值可以是任何类型的,但必须是一个不可改变的数据类型,如字符串,数字,或元组键。
This means that it is much easier to write multi-threading applications in functional languages because immutable data structures inherently interact cleanly with threads.
这意味着以函数式语言编写多线程应用程序要容易得多,因为不可变数据结构与线程交互起来非常自然,因而代码可以很简洁。
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.
在考虑每个节点都是一个不可变数据结构的节点树时,我们必须考虑如何修改树内的一个节点或多个节点,而不必更改整个树。
Immutable policy versions and the ability to check policy data completeness supports optimization for distributed and responsive environments.
不变策略版本及检查策略数据完整性的能力支持分布及响应环境的优化。
Rather, a new immutable version of the data structure is returned.
而是返回该数据结构的一个新的不可变版本。
Further, for data members that are object references, the referred-to objects must be effectively immutable.
此外,对于对象引用的数据成员,引用的对象必须是有效不可变的。
Another difference between the container types results from the nature of the data they hold. The following four container types are immutable sequences.
容器类型间的另一个不同点来自于它们所持有的数据的特性,下面四种容器类型的顺序是不可变的。
The third article in this series, " Exploring the Python type hierarchy, Introducing Strings," introduces the Python string, which is also an immutable sequence, but only for character data.
本系列的第三篇文章探索Python类型的层次结构 —— 使用字符串介绍了 Pythonstring,这也是一个不可变的序列,但仅针对字符数据。
Because strings are immutable, this approach means a new string will be constructed each time through the loop, with the data copied from the old string and a single character added at the end.
因为字符串是不可变的,所以这种方式意味着每次循环时会构建一个新的字符串,从老的字符串拷贝数据并在最后增加一个字符。
URI versioning […] is a design choice when resources are immutable across time and we create new resources for state changes (similar to how we manage time-series data in a database).
URI版本控制 […]是一种设计决定,用于当资源不随时间的变迁而变化时,我们为状态的改变创建新资源(类似于管理数据库中的时间序列数据)。
If I have to do bit manipulation of large amounts of binary data, why is it, that Scala's primitive types are immutable?
如果我需要在大量的二进制数据上进行字节操作,这就有问题了,Scala的基本类型是常量化的吗?
If the internal state cannot change, there is no chance for different threads to see inconsistent views of the data. Immutable types can be exported from your objects safely.
如果内部状态不能被改变,那么对于不同的线程来说,就没有机会看到这个数据的不同值。
If the internal state cannot change, there is no chance for different threads to see inconsistent views of the data. Immutable types can be exported from your objects safely.
如果内部状态不能被改变,那么对于不同的线程来说,就没有机会看到这个数据的不同值。
应用推荐