Programming Paradigms

Main paradigm approaches 1

Imperative

Computation as statements that directly change a program state (datafields)

Direct assignments, common data structures, global variables

Edsger W. Dijkstra, Michael A. Jackson

C, C++, Java, PHP, Python

Structured

A style of imperative programming with more logical program structure

Structograms, indentation, either no, or limited use of, goto statements

Imperative

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

Structured, imperative

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

Declarative

Clojure, Coffeescript,[1] Elixir, Erlang, F#, Haskell, Lisp, Python, Scala, SequenceL, SML

Event-driven including time driven

Program flow is determined mainly by events, such as mouse clicks or interrupts including timer

Main loop, event handlers, asynchronous processes

Procedural, dataflow

Javascript, ActionScript, Visual Basic

Object-oriented

Treats datafields as objects manipulated through pre-defined methods only

Objects, methods, message passing, information hiding, data abstraction, encapsulation, polymorphism, inheritance, serialization-marshalling

Common Lisp, C++, C#, Eiffel, Java, PHP, Python, Ruby, Scala

Declarative

Defines computation logic without defining its detailed control flow

4GLs, spreadsheets, report program generators

SQL, regular expressions, CSS, Prolog

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

Imperative, event-driven

AsmL

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s