在下一期文章中,我将深入介绍函数编程中的重要概念:不可变性。
In the next installment, I'll talk in depth about one of functional programming's building blocks: immutability.
我在本文讨论的Joda类具有不可变性,因此它们的实例无法被修改。
The Joda classes I discuss in this article are immutable, so instances of them cannot be modified.
项目不可变性导致学习的失败,而这一影响在企业的技术环境不稳定时变得更加糟糕。
Project inflexibility leads to learning failure, and this effect is worsened when the technological environment of the firm is turbulent.
前人在把握民间舞蹈不可变性的创作实践中,经历了“脱俗变雅”,由“内容出发”和“从形式到形式”三个阶段。
The practice of immutability of the folk dance has experienced three stages: "changing from common to elegance", "evaluating content" and " from form to form".
JoshuaBloch将这称作失败的原子性:在已经构建对象后,这种基于不可变性的成功或是失败就是一锤定音的了(请参阅参考资料)。
Joshua Bloch calls this failure atomicity: success or failure based on mutability is forever resolved once the object is constructed (see Resources).
我们讨论过了死亡的不可避免性,我们讨论过了其可变性,不同的人在他们死之前有所的时间长度不同。
We talked about the inevitability of death; we talked about the variability, that people have different lengths of time before they die.
在我们的世界不仅有可变性,还有不可预见性。
In our world, not only do we have variability, we've got unpredictability.
它实际上并没有太多的相关搜索结果,而搜索结果的可变性决定我们不可能评价出一个搜索引擎总是好于另外一个。
It doesn't really have more relevant search results; the variability is so great that it's impossible to say whether one search engine consistently performs better than another.
Python同时使用可变性和不变性的概念:举例来说,tuple就是一个不可变的列表。
Python also has a concept of mutability and immutability: a tuple, for example, is an immutable list.
在我们的世界上不仅有可变性还有不可预见性。
There is not only changeability but also unpredictability in our world.
但实际上,至少在逻辑上讲,可变性虽然是不可预见性的必要条件,但是不可预见性却不是必然。
But in fact, logically speaking at least, variability, although it's a requirement for unpredictability, doesn't guarantee unpredictability.
除了不可避免性之外,除了可变性之外,除了不可预知性之外,还有个事实便是死亡,是无处不在的,正如我所想的那样。
In addition to the inevitability, in addition to the variability, in addition to the unpredictability, there's the fact that death is, as I like to think of it, ubiquitous.
而总有些类显然不可能是不变类的,这时也要尽可能的限制它的可变性。
There are some class immutable is impossible, then try to limit the mutability of them.
而总有些类显然不可能是不变类的,这时也要尽可能的限制它的可变性。
There are some class immutable is impossible, then try to limit the mutability of them.
应用推荐