COMPUTING SCIENCE 370
Programming Languages
Programming Languages
An Overview
Why Study Programming Languages?
- Knowledge of a wide range of languages allows one to choose the language best suited to a problem,
based on:
- features / benefits (language design)
- performance / costs (implementation)
- Language features which are known but are not available may be simulated.
- Program design often depends on the implementation language.
- Sapir-Whorf Hypothesis: the structure of language defines the boundaries of thought.
- A given language can facilitate or impede certain modes of thought.
- The history of programming languages parallels that of programming methodology.
- Familiarity with a variety of languages facilities speeds the learning of new languages.
- Techniques of language design may be applied in other domains:
- hardware design
- user interface design
- systems design (OS, DB, expert systems)
What is a Programming Language?
- computer language
- a language used to control and interact with a computer
often a special-purpose language:
- airplane reservation system
- banking transaction system
- report generator
- programming language
- a language intended for the expression of computer programs and capable of expressing
any computer program
- for the execution or description of algorithms
- equivalent to a universal Turing machine -- a machine which can simulate any
Turing machine (i.e., which can solve any function which is computable)
All programming languages are equivalent in terms of theoretical power, but differ in their practical power
for solving a given problem.
An Historical Overview
First Generation
FORTRAN, COBOL, BASIC
- machine orientation -- control structures and data structures are based on the structures of computers
of the early 1960's
- linear structures -- characterized by card-oriented, linear arrangement of statements; no nesting of scopes
Second Generation
Algol, PL/I
- hierarchical structure -- block structure, structured control constructs
- generalization and elaboration -- free format, recursion, strong typing
Third Generation
Pascal
- simplicity and efficiency = security
- application-oriented -- user-defined types and type constructors; nested data structures; case statement
Fourth Generation
Ada, Modula-2
- modularity and data abstraction -- information hiding, encapsulation, abstract data types
- support for concurrency -- message passing to synchronize concurrent tasks
Do not confuse these with "fourth-generation languages" (4GL's), which are application generator
programs (usually database languages).
Fifth Generation
- Functional programming: LISP, FP
- high level of abstraction
- order-independent evaluation -> parallel computation
- Object-oriented programming: Simula, Smalltalk
- programming as simulation
- causal interaction among objects by message-sending
- encapsulated state
- Logic programming: Prolog
- highest-level language
- symbolic logic as language
- nonprocedural -- "what", not "how"
- proof of theorem = execution of program
- separates logic and control
Copyright © 2000 Jonathan Mohr