Skip to content

Paradigms

Are a way of classifying programming languages based on their features

Common paradigms

Imperative

first do this; next do that;

  • the programmer tells the computer what to do
  • commands have measureable effect on the program state
  • order of commands is important
  • change of the program state is a function of time

    • procedural: group instructions into subroutines (procedures, methods, functions)
    • object-oriented: encapsulation and logical grouping of behaviour and state, information hiding

Declarative

  • the programmer specifies the result, not how to get it

    • functional: originates in mathematics, immutability, timeless, functions as first-class citizens

References


Last update: November 23, 2020