
COMPUTING SCIENCE 370 -- Programming Languages
Programming Language Paradigms
Scientific Paradigms
- paradigm
- "universally recognized scientific achievements that for a time
provide model problems and solutions to a community of
practitioners" [Thomas Kuhn, 1962]
-
- defined intensionally -- by their properties
- defined extensionally -- by one or more instances
- exemplar
- an example that helps to define a paradigm
Components of a Paradigm
A discipline organized around a paradigm has several components
[Kuhn, 1970]:
- symbolic generalizations -- written rules or laws of the
paradigm
- beliefs of the community of practitioners
- values of a group about what is most important
- exemplars, including problems and solutions
In support of the second and third points, see
Kent Pitman's article More Than Just Words:
Lambda, the Ultimate Political Party in which he argues that "
Lisp is
better defined as its community than as its various
specifications."
Programming Language Paradigms
- paradigms
- "patterns of thought for problem solving" [Peter Wegner,
1988]
- How are they discovered?
- Why do we consider abstractions rather than individual
languages?
- What are the central concepts and the exemplars for each
paradigm?
Imperative Paradigms
- Block-structured, procedural languages
- statement-oriented, with variables holding values
- can model the execution of a program as a series of states of
variable locations
- two kinds of statements:
- declarations (non-executable)
- allocate memory
- bind symbolic names to absolute memory locations
- initialize memory
- imperatives (executable)
- computation
- control flow
- I/O
- Object-oriented languages
- objects contain private state information and communicate by
sending messages
- concept of classes, with instantiations of
differences
- programming as simulation
Declarative Paradigms
"Higher-level" programming
- can express the same program with less detail -- the language
does more automatically
- less procedural than a lower-level language -- we can focus on
"what" instead of "how"
- Applicative (functional) programming
- operation-oriented: successive function evaluation
- pure functional programming -- no side effects,
no concept of locations
- functions are first-class values
- Logic programming
- a series of logical assertions and queries
- specifications can be executed directly
- knowledge base and inference facility
Distributed Paradigms
Distributed programming may constitute a separate paradigm.
Exemplars:
- Ada (rendezvous)
- Concurrent Prolog
- Linda
- Occam
Copyright © 2000 Jonathan Mohr