Programming Language

[TOC]

三种编程风格。 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

Programming_language_Chapter1_pdf(第_4_页,共_20_页)

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

Interpreted

complie

Compiled

interprete

Hybrid Language Implementations

hybird

1.5 Where do we go from here?