维持代码的正确性的抽象函数与关键常量。
The abstraction function and key invariants for the correctness of the code.
所有许可都有一个名称(解释依赖于子类)和用于定义特定的Permission子类语义的抽象函数。
All permissions have a name (whose interpretation depends on the subclass), as well as abstract functions for defining the semantics of the particular permission subclass.
可以用另一个便利函数抽象这个过程,如清单5所示。
You can abstract this out with yet another convenience function, shown in Listing 5.
函数对象是一个重要的普通程序的一部分,因为他们允许抽象比类型对象还要多,而且比它正在执行的操作还要多。
Function objects are an important part of generic programming because they allow abstraction not only over the types of objects, but also over the operations that are being performed.
这在减少冗余性的路上已经跨进了一大步,但仍然不是很抽象,因为它还是会要求用户以命令方式来计算比较函数。
This is a big step forward in reducing verbosity but is still not any more abstract - it still forces the user to calculate the comparison function imperatively.
在我们当前的树访问者函数中可以轻松抽象这些函数,并支持预构建和自定义的迭代策略。
It is easy to abstract these functions in our current tree-visitor function and allow for pre-built and custom iteration strategies.
但是,如果您更喜欢在较抽象的层面上工作——在程序中使用简单的API或函数——那么该工具对于您来说就过于低级了。
However, if you prefer to work at a more abstract level — using simple APIs or function calls within a program perhaps — this tool may be too low level for you.
用复杂的方式组合函数,是函数性语言生产力的关键,这是因为这可不断提高抽象的层次。
Composing functions in complex ways is the key to productivity in functional languages because you're continually raising your level of abstraction.
现在,如果可以,最好是能够将这些样板部分抽象成一个函数。
Now, if you can, it's best to abstract out the boilerplate portions into a function.
高阶函数提供比面向对象概念更高层次的抽象。
Higher-order functions offer a higher level of abstraction than object-oriented concepts.
我使用该标签创建了一个新的函数,将抽象模型(原始输入文件)中指定的类型映射到输出文件中的SQL原生类型(清单6)。
I used this tag to create a new function that maps types specified in the abstract model (the original input file) into SQL native types for the output file (Listing 6).
函数语言结构,如高阶和一级函数,能让我对抽象的理解更进一步,让我更多地将精力放在代码能做什么而不是怎么做 上。
Functional language constructs such as higher-order and first-class functions allow me to climb one more rung up the abstraction ladder and focus more on what the code does rather than how it does it.
函数编程代表了下一个抽象阶段:将更加琐碎的细节如遍历、并发性和状态尽可能留给运行时处理。
Functional programming represents the next abstraction leap: ceding more mundane details such as iteration, concurrency, and state to the runtime as much as possible.
分隔符也抽象为这个函数的一个参数。
The separator is also abstracted out as a parameter to this function.
因为它没有函数体,所以称之为抽象。
一般情况下在使用高级抽象,比如函数编程时,您不需要了解实现细节,但这并不意味这在必要的情况下,就无法了解。
Just because you usually surrender knowledge of implementation details when using higher-level abstractions like functional programming doesn't mean that you can't get down and dirty if you must.
实际的读写标签在函数中进行了抽象,因此,如果使用不同的模块读写MP3标签,就不需要更改很多内容。
The actual reading and writing of tags is abstracted in functions, so you won't have to change a lot if you use a different module for MP3 tag reading and writing.
在VFS下面是文件系统抽象,它定义了上层函数的实现方式。
At the bottom of the VFS are the file system abstractions that define how the upper-layer functions are implemented.
在第2部分,我将探讨专为操作浮点数(与抽象实数相反)而设计的函数。
In Part 2, I'll explore the functions more designed for operating on floating point Numbers as opposed to abstract real Numbers.
此外,清单13显示了抽象方法的用法,演示如何将基本功能放入基类中以及如何阻止实现类使用特定函数。
Additionally, Listing 13 shows the use of an abstract method to demonstrate how basic functionality can be put into a base class and specific functionality can be deterred to an implementation class.
在第2部分中,我主要关注这样一些函数,它们的目的是操作浮点数,而不是抽象实数。
Here in Part 2, I focus on the functions that make sense only when you realize that they're designed for operating on floating-point Numbers instead of abstract real Numbers.
rule_to_abstract函数构造并返回一个抽象形式的Erlang控制结构。
The rule_to_abstract function builds and returns an Erlang control structure in abstract form.
有很多途径导致坏的代码,其中之一就是使用非常抽象的函数名和变量名,比如routineX48,PerformDataFunction,DoIt,HandleStuff,do_args_method。
There are many ways to write bad code. One is to use very abstract function and variable names such as routineX48, PerformDataFunction, DoIt, HandleStuff, and do_args_method.
有大量样板文件的程序,但是无法抽象成函数
Programs that have a lot of boilerplate code that cannot be abstracted into functions
这些由列表构建的简单指令构成了递归、高阶函数,甚至是闭包和continuation之类高级抽象的基础。
These simple list-building instructions form the foundation of recursions, higher-order functions, and even higher-order abstractions like closures and continuations.
实现一个函数来返回当前存储在抽象缓冲区中的字节数目,这样可能会带来好处。
You may benefit by implementing a function that returns the number of bytes currently stored in an abstract buffer
它构造一种抽象形式的Erlang表达式,并返回一个匿名函数,让它以后再动态地求解。
It builds an Erlang expression in abstract form and returns an anonymous function which can dynamically evaluate it later.
采用类似的方式,您可以使用以下函数,逐段地从抽象缓冲区读取数据段。
In a similar fashion, you can read data segments off segment by segment from an abstract buffer with the following function.
要逐步向抽象缓冲区追加数据段,可使用以下函数
To incrementally append data segments to an abstract buffer, use the following function
这个版本的to_function取得业务逻辑的抽象形式之后,会返回一个匿名函数(与前一个版本的to_function一样)。
Once the business logic is obtained in abstract form within this version of to_function, it returns an anonymous function (just like the first version of to_function).
应用推荐