Programming styles are defined as much by what they ban as by what they allow
Structured programming outlawed the goto statement. Pure functional programming forbids side effects. Each new way of writing code is partly a list of prohibitions, which is why veterans often find the latest paradigm rigid and preachy. The restrictions exist for a reason: they make programs easier to understand and to prove correct.
A programming paradigm is a high-level way of thinking about and organising a program. The idea borrows its name from science: in his 1978 Turing Award lecture, The Paradigms of Programming, Robert W. Floyd cited Thomas Kuhn's 1962 book The Structure of Scientific Revolutions. Before that vocabulary existed, early code often leaned on goto jumps so heavily that it became tangled spaghetti, hard to follow or fix. Structured programming, championed from the mid-1960s, was one of the first approaches consciously named as a style, and it answered the mess by allowing only disciplined control constructs.
The biggest split is between imperative and declarative code. Imperative programs spell out the order of steps and let one piece of code change some state that another piece reads later, without that link being visible. Machine code, the most prescriptive level of all, falls in this camp, as do most object-oriented languages, which bundle data with the behaviour that manages it. Declarative programs instead describe the result wanted and leave the system to work out the sequence. Functional code treats a program as a chain of stateless function evaluations; logic programming poses questions against facts and rules; a spreadsheet, recalculating whenever a cell changes, is a familiar example of dataflow.
Real languages rarely stay in one box. Smalltalk sticks to objects and Haskell to functions, but C++, PHP and Object Pascal can be written procedurally, in object style, or as a blend. Developers usually just use whatever features they know, and labelling the result by paradigm tends to be an academic exercise after the fact. Researchers such as Harper and Krishnamurthi go further, arguing that paradigms are a poor way to classify languages at all.
Parallel computing shows the limits of neat categories. Details of the hardware leak into the abstractions, so no single parallel language suits every problem, and programmers commonly write in an ordinary sequential language while calling a parallel programming model through an API.
Source: Programming paradigm