Procedural Programming

I have been recently trying to improve my understanding of some of the fundamental concepts in computer science. I looked at procedural programming this time and attempted to extract the important points of the Wikipedia article.

Procedural programming is derived from structured programming and based on the concept of a procedure being a sequence of steps to be executed to achieve a reported goal. In this respect, procedural languages are also imperative languages because they contain not only what to do, but how to do it, by referencing the system state.

Structurally, there is considerable overlap between procedural programming and functional programming as they both originate in structured programming. Functional programs have functions as their routines while procedural programs have procedures. The intent behind functional languages is different, however, as most of the imperative elements are removed or made second-class citizens and functional control constructs are used instead. Procedural languages model programs as a list of imperative commands that may alter a system’s state. Functional languages, on the other hand, are designed to support pure functions, or routines that depend only on their inputs and nothing else, and which do not alter the system state.

Procedural programming differs from object-oriented in the way data and functionality are bundled. Procedural programming deals with variables, data structures and subroutines; object-oriented programming uses objects that expose behaviour (methods) and data (attributes) via interfaces. In procedural programming, procedures operate on data structures while in object-oriented programming methods and data attributes are bundled together.


Comments