Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
Procedural programming is a programming paradigm that uses a linear or top-down approach. It relies on procedures or subroutines to perform computations.
Procedural programming is also known as imperative programming.
In procedural programming, a program consists of data and modules/procedures that operate on the data. The two are treated as separate entities. In the object-oriented programming (OOP) paradigm, however, a program is built from objects. An object is an instance of a class, which is an encapsulation of data (called fields) and the procedures (called methods) that manipulate them. In most, but not all, cases, the fields can only be accessed or modified through the methods. An object therefore is like a miniature program or a self-contained component, which makes the OOP approach more modularized and thus easier to maintain and extend.
Another type of programming paradigm that procedural programming can be contrasted with is event-driven programming. In this approach, procedures are called/executed only in response to events, which may include mouse clicks, keyboard press, attaching or removing a device, arrival of data from an external source, etc. As these events are unpredictable, the procedures that handle them cannot be executed linearly as is the case with procedural programming.
Do you work in the tech industry? Help us learn more about why the gender gap still exists in tech by taking this quick survey! Survey respondents will also be entered to win a $100 Amazon Gift Card!