第三个视频有关命令式的并行处理。
命令式编程明确塑造了您的思维方式。
许多命令式控制依赖破坏性赋值进行迭代。
Many imperative control structures rely on destructive assignment to do iteration.
满足该要求的命令式分类如清单1所示。
An imperative class that meets these requirements appears in Listing 1.
它们提供了命令式语言通常不提供的一些工具。
They provide some tools that imperative languages usually don't.
清单1展示了用命令式风格编写的数字分类器。
Listing 1 shows the number classifier written in an imperative style.
表1显示了几种常见的命令式或声明式编程语言。
Table 1 shows several common programming languages categorized as either imperative or declarative.
命令式编程的用户对赋值的依赖要超过其他编程技术。
Users of imperative languages rely on assignments more than any other programming technique.
在命令式编程语言中,我们必须在算法中考虑每个原子步骤。
In imperative programming languages, I must think about each atomic step in my algorithm.
命令式编程和声明式编程方法之间的一个关键差异是完整性。
One critical difference between imperative and declarative programming methodologies is the notion of completeness.
在命令式语言中,输入相同而可能返回不同值的方法,都有副作用。
In imperative languages, any method that can possibly return different values, given the same input, has side effects.
声明性编程样式在声明约束方面几乎一直比命令式或过程序样式更直接。
A declarative programming style is almost always a more direct way of stating constraints than is an imperative or procedural one.
不太久之前编程语言还可以毫无疑义地归类成“命令式”或者“函数式”。
Until relatively recently programming languages have fit neatly into either "imperative" or "functional" categories.
命令式的并行处理是基于并行版本的Do、For和For -Each操作。
Imperative parallelism is based on parallel versions of Do, For, and For-Each.
尽管如此,对命令式语言程序员来说,状态的改变依然是程序设计错误的主要原因。
Still, state changes are consistently one of the chief causes for programming errors for imperative programmers.
这种命令式的绘图模型更类似于opengl风格的绘制,而不是声明性的Web。
This model of imperative graphics owes much more to OpenGL-style drawing than to the declarative Web.
Ocaml被选中的一部分原因是,它支持函数式、命令式和面向对象的混合编程风格。
OCaml as was chosen a basis in part because it supports a mix of functional, imperative, and object-oriented programming styles.
实际上,如果对转换进行良好的文档记录,甚至可以在配置中混合声明式语句和命令式语句。
In fact, if the transformation is well documented, you can even mix declarative and imperative statements within your configuration.
许多使用其他的程序设计语言范型的语言,例如面向对象的、命令式的,等等,也是动态语言。
Many languages using other programming language paradigms, such as object-oriented, imperative, and so on, are also dynamic languages.
如果您和大多数程序员一样,那么您一定是从像 C++ 的命令式语言开始您的编程生涯的。
If you're like most programmers, you started your career with an imperative language like C++.
这些公司从命令式(手工的)操作转换为声明服务器所需要的最终状态,从而达到可扩展的运维。
These companies achieve scalable operations by shifting from imperative (manual) actions to declarations about the desired end state of a server.
函数式编程为您提供了新的、不同的构建块,可以实现命令式语言使用其他机制实现的相同效果。
Functional programming gives you new, different building blocks to achieve the same goals that imperative languages accomplish with other mechanisms.
命令式编程由一系列带有明确顺序的语句构成,它们的算法和编程构造严重依赖于应用程序的状态。
Imperative programs are formed by a sequence of statements with an explicit order, and their algorithms and programming constructs rely heavily on application state.
一旦你习惯了新的绑定、触发器及动画支持,你就很难回到老风格命令式的、事件驱动的UI编程方法。
Once you get used to the new bind, trigger and animation support, it is hard to go back to the old style of imperative, event-driven UI programming.
最受欢迎的通用编程语言(包括Python和其它面向对象的语言)在样式上绝大多数都是命令式的。
The most popular general purpose programming languages -- including Python and other object-oriented languages -- are predominantly imperative in style.
从而,在只是付出了一些指令的代价后,您的程序会拥有函数式程序的可证明性和命令式程序的速度和内存特性。
So, for the price of at most a few instructions, your program can have the provability of a functional program and the speed and memory characteristics of an imperative one.
很难想像没有这些特征的编程语言,因为命令式语言“告诉我如何做”的方式是如此深刻地确立在我们的日常编程哲学中。
It's hard to imagine programming languages without these characteristics because imperative languages' "tell me how to do it" approach is so firmly entrenched in our everyday programming philosophies.
按钮拥有名为onclick的参数,它的值是Callback,当事件发生的时候,就会执行一段命令式的应用程序逻辑。
A button has an argument named onclick whose value is a Callback, a snippet of imperative application logic to be executed when the event occurs. In this particular case two things happen.
命令式语言程序员将对不使用流程控制就可以完成的工作而感到惊讶;如果不使用它,很多工作会更加简单,这将使他们更为惊讶!
Programmers of imperative languages will be surprised by what you can do without flow control; they'll be even more surprised at how much easier many tasks are without it!
递归在haskell中至关重要。与命令式语言要求你去表达求解的方式不同,haskell更倾向于让你提供问题的描述。
Recursion is important to Haskell because unlike imperative languages, you do computations in Haskell by declaring what something is instead of declaring how you get it.
应用推荐