3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Programming Paradigms

Last updated at Posted at 2018-07-17

A programming paradigm is a style, or “way,” of programming.
some common paradigms:

  • Imperative: Programming with an explicit sequence of commands that update state.
  • Declarative: Programming by specifying the result you want, not how to get it.
  • Structured: Programming with clean, goto-free, nested control structures.
  • Procedural: Imperative programming with procedure calls.
  • Functional (Applicative): Programming with function calls that avoid any global state.
  • Function-Level (Combinator): Programming with no variables at all.
  • Object-Oriented: Programming by defining objects that send messages to each other. Objects have their own internal (encapsulated) state and public interfaces.
      Object orientation can be:
    • Class-based: Objects get state and behavior based on membership in a class.
    • Prototype-based: Objects get behavior from a prototype object.
  • Event-Driven: Programming with emitters and listeners of asynchronous actions.
  • Flow-Driven: Programming processes communicating with each other over predefined channels.
  • Logic (Rule-based): Programming by specifying a set of facts and rules. An engine infers the answers to questions.
  • Constraint: Programming by specifying a set of constraints. An engine finds the values that meet the constraints.
  • Aspect-Oriented: Programming cross-cutting concerns applied transparently.
  • Reflective: Programming by manipulating the program elements themselves.
  • Array: Programming with powerful array operators that usually make loops unnecessary.

Paradigms are not meant to be mutually exclusive; a single program can feature multiple paradigms!

some observations:
  • Very few languages implement a paradigm 100%. When they do, they are pure. It is incredibly rare to have a “pure OOP” language or a “pure functional” language.
  • A lot of languages will facilitate programming in one or more paradigms.
main source used for this article : Paradigms.
3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?