The following are widely considered the main programming paradigms:
| Paradigm | Description | Main traits | Examples |
|---|---|---|---|
| Imperative | Programs as statements that directly change computed state (datafields) | Direct assignments, common data structures, global variables | C, C++, Java, PHP, Python, Ruby |
| Structured | A style of imperative programming with more logical program structure | Structograms, indentation, no or limited use of goto statements | C, C++, Java, Python |
| Procedural | Derived from structured programming, based on the concept of modular programming or the procedure call | Local variables, sequence, selection, iteration, and modularization | C, C++, Lisp, PHP, Python |
| Functional | Treats computation as the evaluation of mathematical functions avoiding state and mutable data | Lambda calculus, compositionality, formula, recursion, referential transparency, no side effects | C++,[1] Clojure, Coffeescript,[2] Elixir, Erlang, F#, Haskell, Lisp, Python, Ruby, Scala, SequenceL, Standard ML, JavaScript |
| Event-driven including time-driven | Control flow is determined mainly by events, such as mouse clicks or interrupts including timer | Main loop, event handlers, asynchronous processes | JavaScript, ActionScript, Visual Basic, Elm |
| Object-oriented | Treats datafields as objects manipulated through predefined methods only | Objects, methods, message passing, information hiding, data abstraction, encapsulation, polymorphism, inheritance, serialization-marshalling | Common Lisp, C++, C#, Eiffel, Java, JavaScript, PHP, Python, Ruby, Scala |
| Declarative | Defines program logic, but not detailed control flow | Fourth-generation languages, spreadsheets, report program generators | SQL, regular expressions, CSS, Prolog, OWL, SPARQL |
| Automata-based programming | Treats programs as a model of a finite state machine or any other formal automata | State enumeration, control variable, state changes, isomorphism, state transition table | Abstract State Machine Language |