Imperative

by John Backus

Origin

Imperative programming cannot be attributed to a single individual as it is one of the earliest forms of programming, derived from machine languages and assembly languages. The central idea of managing state through sequential instructions emerged with the development of the first computers.

Historical Context

The foundations of imperative programming were established in the mid-20th century with the creation of languages like Assembly and Fortran (1950s), developed by various research teams, including John Backus, who is considered one of the creators of Fortran.

In the source code of a program, instructions (commands) are written.

Imperative programming is based on direct instructions that the computer must execute. The programmer defines a sequence of steps that must be performed to achieve a specific result. These steps usually include operations with variables, control of execution flow (such as loops and conditional operators), as well as function or procedure calls.

Instructions Must Be Executed Sequentially

One of the key characteristics of the imperative paradigm is the sequential execution of instructions, which implies that the program’s outcome depends on the order in which these instructions are executed. A disruption in sequence can lead to unexpected results, requiring careful control over the execution flow by the programmer.

Data From Previous Instructions Can Be Read by Subsequent Instructions

Imperative programming actively uses the concept of changing the program’s state. This means that each instruction can change the values of variables, which are then used in subsequent instructions. These variables are stored in memory, and their state changes as the program executes.

Data From an Instruction Can Be Written to Memory

The program’s state is changed by writing data to memory. For example, the result of an arithmetic operation can be saved in a variable for future use. This state change is a defining characteristic of imperative programming languages like C, Python, or Java.

The imperative paradigm is well-suited for tasks where it is important to closely control the execution of steps and manage the program’s state. However, complexity can increase as the number of states and branches grows, requiring the programmer to take a more thoughtful approach to code design and debugging.

Examples of Languages

  • Assembly
  • BASIC
  • JavaScript

imperative paradigm


Buzzwords
strong-weak-ties programming social-group-dynamics mindmap platform-networks structural-functionalism rationalism structuration-theory cognitive-capital mediatisation-theory operationalization enterprise Babylon automation social-action marketplace AI actor-network ideas scrum discord cognition communication social-capital financial production semantic-gap aspect-oriented umwelt empiricism positivism gap actor-network-theory research complexity information imperative verification problem psychologism game-dev streaming systems-theory disciplinary-power multiple-worlds-theory teamwork theory systems elephant cloud knowledge-communication structure tools symbolic-interactionism babylon field-theory messengers element security network e-commerce mediation-market big-data fact information-society concept communities philosophy social-network elements development object service multimedia sociology paradigm distribution theories language lenses epistemology metaphor social-exchange functional deconstruction linguistics anthropology meaning apriorism institutionalization-theory analytics projects conceptualization concepts poststructuralism procedural knowledge hoare-triples domain semantics consumption-theory syntax capitalist-systems subject