Out of this, we'll see if we can assemble a more dynamic and mutable requirements gathering procedure.
除此之外,我们还会看看是否能够组织起一个更动态更可变的需求收集过程。
If the programmer wants a mutable value, he should say so explicitly.
如果程序员需要一个可变的值,可以显式地指定。
While mutable containers are very flexible, their dynamic nature can result in a performance hit.
虽然可变容器非常灵活,但它们的动态特性会对性能造成影响。
So it is difficult to write concurrent systems built on mutable state and locks that continue to be reliable as a system grows.
因此编写构建于可变状态和锁之上、且该状态和锁随系统增长仍然可靠的并发系统很难。
If you are creating a mutable class m, you should be prepared to write a lot more documentation about the treatment of references to m than if m were immutable.
如果您要创建一个可变类m,那么您应该准备编写比m是不可变的情况下多得多的文档说明,以说明怎样处理m的引用。
For example, a user is a mutable entity, but you might use an immutable value object to represent the user's address, just changing the address that you point to for the user if he or she moves.
例如,虽然用户是可变实体,但是您可以使用不可变值对象来表示用户的地址,如果用户移动了位置,那么只需为该用户更改您所指向的地址。
The purpose of a lock is to protect a mutable resource, or stated another way to protect potentially multiple users of that mutable resource from accessing a corrupt version of the resource.
锁的目的是为了保护可变资源,或者换句话说,是为了避免可变资源的多个潜在用户访问资源已被破坏的版本。
A mutable variable is declared with the keyword var.
一个可变的变量用关键字var来声明。
A variable stores the current state and is genuinely mutable.
变量存储了当前状态,并且真正是可变的。
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 list is a heterogeneous mutable container, which means it can hold different types of objects and can be modified after it has been created.
list是异构可变容器,这意味着它可以存放不同类型的对象且创建后可以修改。
Using either while or mutable state sacrifices a key aspect of the Scala language, however, which is the encouragement to write code that parallelizes well.
但是,使用while或可变状态意味着牺牲scala语言的另一个关键方面,即鼓励编写具有良好并行性的代码。
The approach taken here is to store a mutable holder for the high scoring player's name and score in the ServletContext.
这里采用的方法是在ServletContext中存储一个包含最高分玩家的名字和分数的可变容器。
The Python list is a mutable sequence, which creates an intriguing possibility: that the body of the for loop could modify the list it is being iterated over.
Pythonlist是一个可变序列,提供了一种令人好奇的可能性:for循环主体可以修改其正在迭代的list。
Not surprisingly, the while loop also requires a set of mutable local variables, in this case named a and b, in which to store the current pivots.
毫不令人奇怪的是,while循环也需要一组可变本地变量,在这里,这些变量被命名为a和b,其中存储的是当前支点。
Agents provide a layer of indirection between the holder of a variable and the mutable state itself.
Agents在变量持有者与可变状态本身之间提供一层间接关系。
This article introduces a new sequence type: the list, which is a mutable sequence type that demonstrates a number of different ways it can be used.
本文介绍一个新的序列类型:list,这是一个可变的序列类型,并演示以多种不同方法使用它。
Or a list of anything that could be mutable.
或者是包含其它有可变的结果的链表。
After all, XSLT is missing some features that are important to a lot of algorithms, including loops and mutable variables.
毕竟XSLT缺少对很多算法来说极其重要的特性,其中包括循环和可变的变量。
Cases where an aliased mutable object gets unexpectedly modified can crop up in a number of subtle and surprising ways, and debugging them can be extremely difficult.
有别名的可变对象被意外修改的情况会以许多微妙且令人惊奇的方式突然出现,并且调试起来相当困难。
When more than one thread accesses a mutable variable, all threads must use synchronization, or else some very bad things can happen.
在不只一个线程访问一个互斥的变量时,所有线程都必须使用同步,否则就可能会发生一些非常糟糕的事情。
There's a loophole when synchronizing on a mutable field, however, which can break down mutual exclusion.
然而,易变域的同步中会有一个漏洞,它可能破坏互斥。
The on parameter is declared as a var, so it is mutable.
开关状态参数(on)被声明为var,所以是可变的。
We could have used a val with a mutable type, like ListBuffer.
我们也可以使用val和一个可变的类型,比如ListBuffer。
Unearthing tidbits often involves some complexity, however, like discovering that you can have your way with HashMap, just as long as you never use a mutable object type as its key.
但是发掘这些有用之物可能有点复杂,比如只要您不将可变对象类型作为键,您就可以用自己的方式使用 HashMap。
The canonical example of code that would want to capture a mutable local would be something like Listing 1.
希望捕获易变的局部变量的典型代码示例可能类似于清单1。
And just like a tuple, a list can hold different types of data (or different types of objects). This is what I mean by a heterogeneous mutable sequence.
就像tuple一样,list也可以持有不同类型的数据(或不同类型的对象),这就是我所说的异构的可变序列。
The dictionary is a heterogeneous, mutable container that relies on a key-to-data value mapping, rather than a particular numerical order to access items from the container.
dictionary是一种异构的、易变的容器,依赖键到数据值的映射(而不是特定的数字次序)来访问容器中的元素。
Clearly, this approach is a pain but the solution is easy: Never use a mutable object type as a key in a HashMap.
很显然,这种方法很糟糕,但是解决方法也很简单:永远不要将可变对象类型用作hashmap中的键。
A Mutable code model which represents a modified code model since the code model offers a read-only view of the code.
一个可变的代码模型,可表示经过修改的代码模型,因为普通的代码模型只是提供了代码的只读视图。
应用推荐