What's The Difference Between Imperative, Procedural and Structured Programming?
Posted
by
daniels
on Programmers
See other posts from Programmers
or by daniels
Published on 2011-10-31T15:24:20Z
Indexed on
2012/11/16
17:16 UTC
Read the original article
Hit count: 561
programming-languages
|paradigms
|procedural
|imperative-programming
|structured-programming
By researching around (books, Wikipedia, similar questions on SE, etc) I came to understand that Imperative programming is one of the major programming paradigms, where you describe a series of commands (or statements) for the computer to execute (so you pretty much order it to take specific actions, hence the name "imperative"). So far so good.
Procedural programming, on the other hand, is a specific type (or subset) of Imperative programming, where you use procedures (i.e., functions) to describe the commands the computer should perform.
First question: Is there an Imperative programming language which is not procedural? In other words, can you have Imperative programming without procedures?
Update: This first question seems to be answered. A language CAN be imperative without being procedural or structured. An example is pure Assembly language.
Then you also have Structured programming, which seems to be another type (or subset) of Imperative programming, which emerged to remove the reliance on the GOTO statement.
Second question: What is the difference between procedural and structured programming? Can you have one without the other, and vice-versa? Can we say procedural programming is a subset of structured programming, as in the image?
© Programmers or respective owner