This all can be done with no mutable state in the client code.
所有这些都可以在客户端代码中没有可变状态的情况下完成。
Should loop counters be mutable?
循环计数器应该是可变的吗?
最大限度地减少可变状态。
A mutable variable is declared with the keyword var.
一个可变的变量用关键字var来声明。
More often than not, they involve mutable object state.
而它们时常也会涉及易变的对象状态。
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,所以是可变的。
For mutable objects, the answer is not always so clear.
对于可修改对象来说,答案并不总是如此清楚。
A variable stores the current state and is genuinely mutable.
变量存储了当前状态,并且真正是可变的。
We could have used a val with a mutable type, like ListBuffer.
我们也可以使用val和一个可变的类型,比如ListBuffer。
And this all can be done with no mutable state in the client code.
在客户代码中,这些都可以在不使用可变状态的情况下就能做到。
Some design problems are easier to solve with mutable objects.
有一些设计问题还是使用易变对象比较容易解决。
Scala also will not prevent you from writing code with mutable state.
Scala也不会阻止您在可变状态下编写代码。
One approach to this issue is to minimize mutable state in the database.
此问题的一种解决方法是要最大限度地减少数据库中的可变状态。
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却同时支持可变和不可变的匿名类型,对于这两种匿名类型,实现和使用的规则也略有不同。
While mutable containers are very flexible, their dynamic nature can result in a performance hit.
虽然可变容器非常灵活,但它们的动态特性会对性能造成影响。
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方法。
应用推荐