In computer science, imperative programming is a programming paradigm that describes computation in terms of statements that change a program state. In much the same way that imperative mood in natural languages expresses commands to take action, imperative programs define sequences of commands for the computer to perform.
The term is used in opposition to declarative programming, which expresses what the program should accomplish without prescribing how to do it in terms of sequences of actions to be taken. Functional and logic programming are examples of a more declarative approach.
Read more about Imperative Programming: Imperative, Procedural, and Declarative Programming, Overview, Block Structure, History
Famous quotes containing the words imperative and/or programming:
“Because humans are not alone in exhibiting such behaviorbees stockpile royal jelly, birds feather their nests, mice shred paperits possible that a pregnant woman who scrubs her house from floor to ceiling [just before her baby is born] is responding to a biological imperative . . . . Of course there are those who believe that . . . the burst of energy that propels a pregnant woman to clean her house is a perfectly natural response to their mothers impending visit.”
—Mary Arrigo (20th century)
“If there is a price to pay for the privilege of spending the early years of child rearing in the drivers seat, it is our reluctance, our inability, to tolerate being demoted to the backseat. Spurred by our success in programming our children during the preschool years, we may find it difficult to forgo in later states the level of control that once afforded us so much satisfaction.”
—Melinda M. Marshall (20th century)