Main menu

Post navigation

Disadvantages of Structured Programming

Structured programming can indeed produce neat code albeit with a lot of effort. The manner in which it is applied also allows for the writing of code that is not organized. The approach itself does not impose any guidelines or rules that make it necessary for order. Structured programming has several other disadvantages; the lack of encapsulation, longer code and lack of information hiding. Encapsulation is a technique that groups related concepts together and allows them to be referred to using a single name. It allows for code to reduce repletion in code and replace them with call to a function. The function is thus the basic unit of encapsulation and also abstraction. Abstraction allows the details of the implementation to be hidden and only expose the interface. Information hiding isolates different parts of a program such that changes to a section do not have to affect other parts.

The lack of encapsulation in structured programming results in longer programs due to the repletion of code in several places within a single program.

This long code in turn makes it difficult to effectively locate and fix errors in the program.

Structured programming lacks information hiding and sometimes there is a clash of variables when different parts of the program overwrite the same variable.

OOP on the other hand allows us to do the following; (Mathworks, 2010).

Identify the components of a system or application.

Analyze and identify patterns to determine what components are reused or share certain features.

Group components based on similarities and differences;

This systematic approach makes it easier and faster to developed programs. As to whether there are any new applications being developed using structured programming I am not aware. In my circles no one uses structured programming anymore. Most developers are turning to using OOP due its obvious advantages. The only application that may be left is in the maintenance of legacy applications that we cannot redo either due to cost or complexity.