This all can be done with no mutable state in the client code.
所有这些都可以在客户端代码中没有可变状态的情况下完成。
最大限度地减少可变状态。
Mutable state and locks are problematic for many reasons.
出于多种原因,可变状态和锁容易出问题。
And this all can be done with no mutable state in the client code.
在客户代码中,这些都可以在不使用可变状态的情况下就能做到。
One approach to this issue is to minimize mutable state in the database.
此问题的一种解决方法是要最大限度地减少数据库中的可变状态。
Scala also will not prevent you from writing code with mutable state.
Scala也不会阻止您在可变状态下编写代码。
When mutable state goes away, almost all concurrency problems go away with it.
可变状态消失时,差不多所有的并发性问题也随之消失。
Agents provide a layer of indirection between the holder of a variable and the mutable state itself.
Agents在变量持有者与可变状态本身之间提供一层间接关系。
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.
因此编写构建于可变状态和锁之上、且该状态和锁随系统增长仍然可靠的并发系统很难。
Methods you call shouldn't depend on the mutable state of any object and should return fully reproducible and predictable results.
您所调用的方法不应依赖于任何对象的易变状态,而应返回可再生产、可预测的结果。
Also, minimize mutable state in your applications and consider NoSQL data stores to improve the scalability of your applications.
此外,应最大限度地减少应用程序中的可变状态,并考虑使用NoSQL数据存储,以提高应用程序的可伸缩性。
In FP, functions have no side effects and variables are immutable, while in OOP, mutable state and side effects are common, even encouraged.
在fp里,函数没有副作用,变量都是不易变的。而在OOP中,可变状态和副作用都十分常见,甚至是被鼓励的。
Notice how the test avoids the risks of mutable state and side effects by not overwriting the native Math.random implementation of the browser.
请注意测试没有覆盖浏览器原生的Math . random实现,从而避免了状态变化的风险和副作用。
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语言的另一个关键方面,即鼓励编写具有良好并行性的代码。
Three places you will want to minimize or eliminate mutable state in your application are on the web servers, in the application, and (possibly even) in the database.
您希望最大限度地减少或消除服务器中的可变状态的三个位置是:Web服务器、应用程序以及(甚至可能)数据库中。
More often than not, they involve mutable object state.
而它们时常也会涉及易变的对象状态。
A variable stores the current state and is genuinely mutable.
变量存储了当前状态,并且真正是可变的。
Functional programming avoids state and mutable data, and instead emphasizes the application of functions.
函数编程可以避免使用状态和可变数据,并改为强调函数的应用。
Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data.
函数式编程是一种编程范式,在这种编程方式中,我们更多的使用函数运算。
Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data.
函数式编程是一种编程范式,在这种编程方式中,我们更多的使用函数运算。
应用推荐