At OSCON, Ovid cited the four paradigms like this:
I've also seen this list in several other places. However, I think this mixes up its concepts a bit. There are really two orthogonal properties acting here: the abstraction style and the control style.
The abstraction style refers to how you break up the logic of your program. It falls into two categories:
The difference is what you put in name. In the procedural style, you put mappings (functions) or actions (procedures) into names. In the object-oriented style, you put things (objects) and messages (methods) into names.
The control style describes how the control flows through the program. It falls into three categories:
In the imperative style, you are instructing the program to do things, to manipulate the state of the world. In the functional style, you are instructing the program to compute things, to evaluate a very complicated mathematical function. In the logical style, you are instructing the program to find objects that satisfy a complex condition.
Here's a table of common languages:
Abstraction | Procedural | OO
Imperative | C | C++, Java
Functional | Scheme, ML | OCaml, Haskell, Lisp (under CLOS)
Logical | Prolog | Curry
A lot of these languages actually cut across the table in various ways. If a language is capable of OO, I've put it in the OO section, even if it has procedural capabilities as well. In fact, all of these languages have procedural capabilities except Java (which still does, but tries to deny it).
Anyway, what I'm wondering has to do with the control style. Three is a strange number for a classification. Usually classifications are powers of two: combinations of orthogonal binary capabilities. What are the orthogonal capabilities in the control style? What's the combination of those that has gone unnoticed?