In the early days of computer science in the 1960ies, programming was done in assembler code, and flow control statements consisted of conditional jumps, period (well, mostly).

However, as HLLs came into use and programs got larger, people discovered that copious use of jump instructions (aka spaghetti code) made programs extremely hard to understand and debug.

Then, in 1968, famous computer scientist Edsger W. Dijkstra wrote an article titled Goto Considered Harmful that appeared in the Communications of the ACM. It sparked a hot discussion, and eventually most people agreed with Dijkstra, advocating a programming style they called "Structured Programming". Jump instructions were to be avoided at all costs, and instead one was to use things like if / then / else blocks, loops and subroutines (or functions or methods, whatever your programming language of choice calls it).

Of course, all thse constructs use jump instructions internally, but it's not as easy to write unmaintainable code because they force the programmer to use logical structures.

Structured Programming turned out to be a big win, and nowadays nearly everyone uses it. It could be argued that Object Oriented Programming is just the logical next step up from Structured Programming.

Log in or registerto write something here or to contact authors.