三种编程风格。 Introduce you to the three styles of programming languages. These styles are: - 面向对象编程 Imperative/Object-Oriented Programming with languages like Java, C++, Ruby, Pascal, Basic, and other languages you probably have used before. - 函数式编程 Functional Programming with languages like ML, Haskell, Lisp, Scheme, and others. - 逻辑式编程Logic Programming with Prolog.
The goal of the text is to help you understand how to use the paradigms and models of com- putation these languages represent to solve problems.
Models of Computation
The Imperative Model
The Functional Model
In the func- tional model of computation the focus is on function calls. Functions and parameter passing are the primary means of accomplishing data transformation.
The Logic Model
In the logic model the programmer doesn’t actually write a program at all. Instead, the programmer provides a database of facts or rules. From this database, a single program tries to answer questions with a yes or no answer.
The Origins of a Few Programming Languages
1.4 Language Implementation
- Interpreted - Compiled
- Hybrid Language Implementations
Hybrid Language Implementations