Immutable types like integers, floats and strings are hashable;
不可变类型比如整形、浮点数和字符串都是散列的;
Immutable types are simple: After they are created, they are constant.
不可变的类型很简单,它们在被创建之后是固定不变的。
The usually rules for immutable types were put into place such as no default constructors and only getters for properties.
通常这些稳定的类型规则被放在非默认的构造器(Constructor)和只有Getter的属性(Property)里。
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.
如果内部状态不能被改变,那么对于不同的线程来说,就没有机会看到这个数据的不同值。
In addition, these simple built-in types are immutable, which means you can't change an object's value after the object has been created.
另外,这些简单的内置类型是不可改变的,这意味着:创建对象之后,您无法更改对象的值。
VB allows both mutable and immutable anonymous types, with subtly different rules for each.
而VB却同时支持可变和不可变的匿名类型,对于这两种匿名类型,实现和使用的规则也略有不同。
Another difference between the container types results from the nature of the data they hold. The following four container types are immutable sequences.
容器类型间的另一个不同点来自于它们所持有的数据的特性,下面四种容器类型的顺序是不可变的。
The last advice on protecting sensitive data is to avoid using immutable data types like String.
最后的建议是关于保护敏感数据的,就是要避免使用不可变的数据类型,比如string。
Public Service Reminder: Making all fields of an object final does not necessarily make the object immutable -- all fields must also be primitive types or references to immutable objects.
PublicServiceReminder:让一个对象的所有字段都为final并不一定使得这个对象不可变 —— 所有的字段还必须是原语类型或是对不可变对象的引用。
If I have to do bit manipulation of large amounts of binary data, why is it, that Scala's primitive types are immutable?
如果我需要在大量的二进制数据上进行字节操作,这就有问题了,Scala的基本类型是常量化的吗?
These types are immutable, which means that when an integer object is created, its value cannot be changed.
这些类型是不可变的,就是说整数对象一旦创建,其值便不可更改。
Taking the direct route, the C# team made anonymous types immutable.
C#团队使得匿名类型稳定下来。
There are two different types of sets available, mutable and immutable.
集合有两种不同的类型,可变和不可变集合。
All literals correspond to immutable data types, and hence the object's identity is less important than its value.
所有字面值都属于不可变的数据类型,因此对象的标识比起它们的值来说显得次要一些。
Collection types for working with immutable data, including list and sequence types.
与不可变资料搭配使用的集合型别,包括清单和序列型别。
Collection types for working with immutable data, including list and sequence types.
与不可变资料搭配使用的集合型别,包括清单和序列型别。
应用推荐