The term is used in opposition to declarative programming, which expresses what needs to be done, without prescribing how to do it in terms of sequences of actions to be taken. Functional and logical programming are examples of a more declarative approach.
Procedural programming is imperative programming in which the statements are structured into procedures (also known as subroutines or functions); the terms are often used as synonyms, but the use of procedures has a dramatic impact on what imperative programs look like and how they are constructed. Heavily procedural programming, in which state changes are localized to procedures or restricted to explicit arguments and returns from procedures, is known as structured programming; from the 1960s onwards, it has been propagated as a technique to improve the maintainability and overall quality of imperative programs. Object-oriented programming extends this approach.
Procedural programming is a step towards declarative specification: by just looking at the names, arguments and return types of procedures, and comments added by the programmer, we can often understand what a procedure is supposed to do without understanding how. At the same time, a complete program is imperative: it fixes the statements to be executed and their order of execution to a large extent. A more radical application of this approach leads to functional or logical programming.
In a pure functional language, such as Haskell, all functions are without side effects, and no explicit state or state changes exist at all. This leaves much room for the implementation to perform smart optimizations, but also more room to do things in a suboptimal way; it becomes harder for the programmer to control the performance of programs. In addition, some tasks are difficult to specify in a purely functional way. Therefore, most functional languages, e.g. Lisp, OCaml and Erlang, still allow explicit assignment, and thereby, support arbitrary mixes of procedural and functional programming.
A similar situation exists for logical programming languages such as Prolog, and database query languages such as SQL: while declarative in principle, they still support a procedural style of programming, which is often employed in practice.
In summary: imperative and declarative programming are the extreme ends on a continuum of programming styles; in practice, a middle ground is often taken or a combination of styles is used.
Assignment statements, in general, perform an operation on information located in memory and store the results in memory for later use. High-level imperative languages, in addition, permit the evaluation of complex expressions, which may consist of a combination of arithmetic operations and function evaluations, and the assignment of the resulting value to memory. Looping statements (such as in while loops, do while loops and for loops) allow a sequence of statements to be executed multiple times. Loops can either execute the statements they contain a predefined number of times, or they can execute them repeatedly until some condition changes. Conditional branching statements allow a block of statements to be executed only if some condition is met. Otherwise, the statements are skipped and the execution sequence continues from the statement following the block. Unconditional branching statements allow the execution sequence to be transferred to some other part of the program. These include the jump, called "goto" in many languages, and the subprogram, or procedure, call.
The 1980s saw a rapid growth in interest in object-oriented programming. These languages were imperative in style, but added features to support objects. The last two decades of the 20th century saw the development of a considerable number of such programming languages. Smalltalk-80, originally conceived by Alan Kay in 1969, was released in 1980 by the Xerox Palo Alto Research Center. Drawing from concepts in another object-oriented language — Simula (which is considered to be the world's first object-oriented programming language, developed in the late 1960s) — Bjarne Stroustrup designed C++, an object-oriented language based on C. C++ was first implemented in 1985. In the late 1980s and 1990s, the notable imperative languages drawing on object-oriented concepts were Perl, released by Larry Wall in 1987; Python, released by Guido van Rossum in 1990; PHP, released by Rasmus Lerdorf in 1994; Java, first released by Sun Microsystems in 1994 and Ruby, released in 1995 by Yukihiro “matz” Matsumoto.
Procedural programming languages lists additional imperative programming languages.
Patent Issued for Methods and Systems for Authoring of Mixed-Initiative Multi-Modal Interactions and Related Browsing Mechanisms
Nov 13, 2013; A patent by the inventors Healey, Jennifer A. (Cambridge, MA); Hosn, Rafah A. (Stamford, CT); Maes, Stephane Herman (Danbury,...