Channel Button

There are 3 articles on this title. You are reading the article ranked and rated #1 by Helium's members.

Computers & Technology   >

Software & Web Development

Get a Widget for this title

History of the 'goto' command

by Lam Luu

The discussion of goto command is, undoubtedly, among the most interesting discussion in early software engineering discipline. Actually, it is among the first thing to be denounced in this discipline. So, as a person in there, I really like to talk about it and, sometimes, use goto for (you know) fun (like when you do something kind of, but not quite, illegal and have some dirty fun with it). Let's have a look at it, as a way to reflect on the history of this influential discipline.

Goto command roots in the very early programming techniques. In these early days, the only way to make computer do something different than arismetic requires goto. Well, it is not even called goto, but jump, and there is even a family of this kind of commands. They actually are still used today, only that we don't see them: in machine code (in early days, you have to directly write machine code, which sucks). The general theme is that you do some computation (compare the money to zero, says), then jump to the appropriate position after that (like jump to shopping when money is greater than zero, to home when money is zero, to bank when money is less than zero, etc.).

From machine code, the jump command is imported to first programming languages as goto command. Although the name is different, the idea is the same: you would mark some code with a name, then tell the computer "goto that code." Usually, this is used with conditional and loop statements. Again, in those days, goto command is vital: without it not much can be done.

Time happily flows, and computer scientists started to discover newer, more comprehensible ways to do repetitive stuffs as well as direct the program flows. For example, we starts to have 'while' and 'for' commands for repeating things, 'case' and 'switch' commands for choosing stuffs. As the computer grew in power, more expensive stuffs started to appear, among which was induction and recursion, both of which is highly valued by computer scientists (who were, and still are, applied mathematicians. Sometimes we cannot really understand what they think, anyway).

However, for a while, goto command was still widely popular. The experienced programmers used out of habit; the younger programmers simply emulated their predecessors; and goto command is, in general, pretty handy and forceful to control the program. The newer structures and devices and tools and techniques are kind of, you know, under used.

Then, in 1987, Edsger Dijkstra, one of the most influential early


Below are the top articles rated and ranked by Helium members on:

History of the 'goto' command

  • 1 of 3

    by Lam Luu

    The discussion of goto command is, undoubtedly, among the most interesting discussion in early software engineering discipline.

    read more

  • 2 of 3

    by Kristopher Chambers

    Ever since the late 1970s, new programming students have been taught how to use a simple instruction called GOTO, yet are

    read more

  • 3 of 3

    by David Harris

    The "goto" command (strictly speaking it's a "keyword" and not a "command") first showed up in the original high level languages

    read more

Add your voice

Know something about History of the 'goto' command?
We want to hear your view. Write_penWrite now!

Helium Debate

Cast your vote!

Is Microsoft Internet Explorer 8's version targeting good or bad?

Click for your side.

130384

Featured Partner

1H2O

1H2O endeavors to create an international network of journalists and media makers with the purpose of generating the ...more

What is Helium? | Buy Web Content | Contact Us | Privacy | User agreement | DMCA | User Tools | Help | Community | Helium’s Official Blog | Link to Helium

Helium, Inc.
200 Brickstone Square Andover, MA 01810 USA