Should loop counters be mutable?
循环计数器应该是可变的吗?
最大限度地减少可变状态。
A mutable variable is declared with the keyword var.
一个可变的变量用关键字var来声明。
If you want mutable fields, then use the keyword var.
如果你希望有可变的字段,那么使用var关键字。
The on parameter is declared as a var, so it is mutable.
开关状态参数(on)被声明为var,所以是可变的。
A variable stores the current state and is genuinely mutable.
变量存储了当前状态,并且真正是可变的。
We could have used a val with a mutable type, like ListBuffer.
我们也可以使用val和一个可变的类型,比如ListBuffer。
Because a list is mutable, it can't be used as the key in a dictionary.
因为list是易变的,所以它不能作为dictionary中的键。
They provide a mutable wrapper for otherwise immutable object references.
它们为那些用其他方式不可改变的对象引用提供了一个可改变的包装器。
When mutable state goes away, almost all concurrency problems go away with it.
可变状态消失时,差不多所有的并发性问题也随之消失。
My penance, constant in degree, is mutable in kind: one of its variants is tranquillity.
我的赎罪,程度不变,但种类一直在变:其中一种便是平静。
VB allows both mutable and immutable anonymous types, with subtly different rules for each.
而VB却同时支持可变和不可变的匿名类型,对于这两种匿名类型,实现和使用的规则也略有不同。
Pass-by-copy semantics for mutable serializable objects when running in a single address space.
在单一地址空间中运行时,易变的可序列化对象的Pass - by - copy语义。
Agents provide a layer of indirection between the holder of a variable and the mutable state itself.
Agents在变量持有者与可变状态本身之间提供一层间接关系。
Out of this, we'll see if we can assemble a more dynamic and mutable requirements gathering procedure.
除此之外,我们还会看看是否能够组织起一个更动态更可变的需求收集过程。
There's a loophole when synchronizing on a mutable field, however, which can break down mutual exclusion.
然而,易变域的同步中会有一个漏洞,它可能破坏互斥。
Scala supports this model with its Actors library, but it allows for both mutable and immutable variables.
Scala通过Actors库来支持这种模式,但是它同时允许mutable(易变的)和immutable(不易变的)变量。
In some embedded systems, there's no need to provide a mutable file system: An immutable one will suffice.
在某些嵌入式系统中,没有必要提供可更改的文件系统:一个不可更改(immutable)的文件系统已经足够。
The canonical example of code that would want to capture a mutable local would be something like Listing 1.
希望捕获易变的局部变量的典型代码示例可能类似于清单1。
Clearly, this approach is a pain but the solution is easy: Never use a mutable object type as a key in a HashMap.
很显然,这种方法很糟糕,但是解决方法也很简单:永远不要将可变对象类型用作hashmap中的键。
Specifically, thread safety is about properly coordinating access to mutable data that is accessed by multiple threads.
具体来说,线程安全是指适当地协调对被多个线程访问的可变数据的访问。
We could have defined those attributes as vars (mutable variables), then setters would have also been generated for us.
也可以将那些属性定义为vars(可变变量),然后也会生成setter方法。
The dictionary container in Python is also a mutable data type, which means you can change it after it has been created.
Python中的dictionary容器也是易变的数据类型,这意味着在创建它之后可以修改它。
The approach taken here is to store a mutable holder for the high scoring player's name and score in the ServletContext.
这里采用的方法是在ServletContext中存储一个包含最高分玩家的名字和分数的可变容器。
After all, XSLT is missing some features that are important to a lot of algorithms, including loops and mutable variables.
毕竟XSLT缺少对很多算法来说极其重要的特性,其中包括循环和可变的变量。
Perhaps the most important pattern for increasing horizontal scalability in the cloud is the minimization of mutable state.
在云中增加水平可伸缩性的最重要模式可能就是最大限度地减少可变状态。
So it is difficult to write concurrent systems built on mutable state and locks that continue to be reliable as a system grows.
因此编写构建于可变状态和锁之上、且该状态和锁随系统增长仍然可靠的并发系统很难。
Systems designed with physical level technologies usually rely on mutable objects residing at various levels of an architecture.
采用物理层技术设计的系统通常依赖于驻留在架构不同层次上的可变对象。
Methods you call shouldn't depend on the mutable state of any object and should return fully reproducible and predictable results.
您所调用的方法不应依赖于任何对象的易变状态,而应返回可再生产、可预测的结果。
Methods you call shouldn't depend on the mutable state of any object and should return fully reproducible and predictable results.
您所调用的方法不应依赖于任何对象的易变状态,而应返回可再生产、可预测的结果。
应用推荐