Imperative Programming

So, having said that object-oriented programming is a new paradigm, what are the different paradigms of programming. Well, in this course I will restrict myself to contrasting the imperative and object-oriented models. If you take a course in programming languages you will encounter other models, such as functional or logic programming paradigms.

The imperative paradigm is the traditional model of computation. In the imperative model we think of the computer as consisting of memory and the CPU, with the state of the computer being given by the contents of memory. Actions occur as a result of assignment, which will change the values of variables. These actions can be placed in loops if we want to do a lot of work. The processing unit is separate from memory, and acts upon memory.

[audio] [real] Text to accompany slide10, in Chapter 1 of An Introduction to Object-Oriented Programming