Monday, 4 February 2013

3-2-1 Programming Language Paradigms

What is a programming language?
A programming language is a notational system for describing computation in a machine-readable computation in a machine-readable and human-readable form ~Louden
Generations of Programming Languages

  • 1GL: Machine Code Languages
  • 2GL: Assembly Languages
  • 3GL: Imperative/Procedural Languages
  • 4GL+: Event-Driven and OOP Languages
Each generation is at a higher level of abstraction.
We divide 3Gl and 4GL Languages into different styles or methodologies of language known as PARADIGMS.
Programming Paradigms:
  • Interactive/Procedural: program = algorithm + data, good for decomposition
  • Functional: program = functions § functions, good for reasoning
  • Logic Programming: program = facts +rules, good for searching
  • Event-Driven: program = GUI + algorithms + data, good for visual development
  • Object- orientated: program = objects + messages, good for modelling.
Fortran
1957, based on mathematical equations and functions.
Innovations:
  • Symbolic notation for subroutines and functions.
  • Assignments to variables of complex expressions.
  • DO loops.
  • Comments.
  • Input/output formats.
  • Machine-independent: works on any computer.
Successes:
  • Easy to learn- high level
  • Promoted by IBM- addressed large user base
  • (scientific computing).
CORAL
Designed by a committee of the US computer manufacturers. Targeted business applications. Intended to be readable by managers.

Innovations:
  • Separate descriptions of environment, data and process.

Successes:
  • Adapted as de facto standard by US DOD.
  • Stable standard for 25 years.
  • Still the most widely used PL for business applications.

PROLOG:
  • Originated at U. Marseilles int eh early 70's and compilers developed at Marseilles and Edinburgh in the mid to late 70's.
Innovations:
  • Theorem proving paradigm
  • Programs as set of clauses: facts, rules and questions.
  • Computation by 'unification'.

Successes:
  • Prototypical logic programming language.