Comment

Comment by johnaspden

I'm not sure you can call structured programming a fad!

An awful lot of languages (I'd say all commonly used ones) use if/then/else, do..while, for..next, and so on, but I can't remember the last time I saw a program with a complicated control flow done by gotos.

Such things were common in the 1970s, in fact the first professional program I ever read did it that way, and it took me ages to work out what was going on.

One particularly confusing technique was to goto a computed expression. Leads to all sorts of interesting bugs.

The whole point of structured programming was "Don't do that! You can do everything you want to do with a small set of restricted control structures, and the control flow is much easier to read".

I'd say that idea won so hard that we don't even notice it.

parent johnaspden 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton