Home > Computers & Technology > Software > Software & Web Development
Created on: November 26, 2008
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
by Lam Luu
The discussion of goto command is, undoubtedly, among the most interesting discussion in early software engineering discipline.
Ever since the late 1970s, new programming students have been taught how to use a simple instruction called GOTO, yet are
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
Helium Debate
Cast your vote!
Which is better, Windows Media Player 11 or Windows Media Player 10 and why?
Click for your side.