Should loop counters be mutable?
循环计数器应该是可变的吗?
最大限度地减少可变状态。
A mutable variable is declared with the keyword var.
一个可变的变量用关键字var来声明。
Tips:Your mutable motivation brings adaptability.
学习相:你的多变使你能够适应事物。
The on parameter is declared as a var, so it is mutable.
开关状态参数(on)被声明为var,所以是可变的。
Mutable state and locks are problematic for many reasons.
出于多种原因,可变状态和锁容易出问题。
If you want mutable fields, then use the keyword var.
如果你希望有可变的字段,那么使用var关键字。
See the "Mutable collections" sidebar for more about that.
请参阅侧边栏“可变集合”,了解更多这方面的信息。
A variable stores the current state and is genuinely mutable.
变量存储了当前状态,并且真正是可变的。
We could have used a val with a mutable type, like ListBuffer.
我们也可以使用val和一个可变的类型,比如ListBuffer。
If the programmer wants a mutable value, he should say so explicitly.
如果程序员需要一个可变的值,可以显式地指定。
Because a list is mutable, it can't be used as the key in a dictionary.
因为list是易变的,所以它不能作为dictionary中的键。
Well now we're going to talk about some mutable types. Things you can change.
那我们接下来要去学习一些可变的类型,我们以一个可能你们大多数人。
When mutable state goes away, almost all concurrency problems go away with it.
可变状态消失时,差不多所有的并发性问题也随之消失。
They provide a mutable wrapper for otherwise immutable object references.
它们为那些用其他方式不可改变的对象引用提供了一个可改变的包装器。
VB allows both mutable and immutable anonymous types, with subtly different rules for each.
而VB却同时支持可变和不可变的匿名类型,对于这两种匿名类型,实现和使用的规则也略有不同。
My penance, constant in degree, is mutable in kind: one of its variants is tranquillity.
我的赎罪,程度不变,但种类一直在变:其中一种便是平静。
In embedded systems with no mutable storage, the initrd is the permanent root file system.
在没有存储设备的嵌入式系统中,initrd是永久的根文件系统。
Lists, specifically, are handy mutable objects that can conveniently even hold multiple values.
明确的讲,列表是一些便利的可变对象,他们甚至可以方便地保留多个值。
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。
In hindsight, the decision to make Point mutable turned out to be costly to program clarity and performance.
依后见之明,使Point成为可变的这个决定被证明对于程序清晰性和性能是昂贵的代价。
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方法。
After all, XSLT is missing some features that are important to a lot of algorithms, including loops and mutable variables.
毕竟XSLT缺少对很多算法来说极其重要的特性,其中包括循环和可变的变量。
应用推荐