Version 4 of imperative programming

Updated 2005-04-09 13:24:00 by NEM

RS: The most traditional way of programming, a sequence of instructions to be executed,

 do this
 do that
 do another_thing

possibly with jumps (see GOTO in Tcl) to other places. Contrasts 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...).


Category Concept