Updated 2015-07-18 14:24:36 by pooryorick

Imperative Programming, also known as procedural programming, in which a sequence of instructions is provided for execution, is the most traditional way of programming. For example:
do this
do that
do another_thing

Conditionals, loops, and jumps provide for control of the flow of execution (see GOTO in Tcl). Contrast with functional programming. I'm not sure about OO, where objects are just told what to do...

SS: Also in imperative programming the program is expressed in terms of program state (usually hold into variables), that is modified by statements executed sequentially, with conditional jumps (or more complex form of imperative control structures like for, while). The jump condition is usually about the state of the program.

NEM: Crudely speaking, imperative programming is about telling a computer how to do something, whereas declarative programming (e.g. functional and logic programming) is about telling a computer what to do. Examples of imperative programming are things like Tk and OO (where you construct stateful widgets/objects, and then manipulate them), whereas a common example of declarative programming would be an HTML document (which describes the structure of the page, but not how to actually construct the view. At least, in principle...).

Page Authors  edit