comp.lang.ada
 help / color / mirror / Atom feed
From: Al Christians <achrist@EASYSTREET.COM>
Subject: GOTO Considered ...
Date: 1997/06/11
Date: 1997-06-11T00:00:00+00:00	[thread overview]
Message-ID: <339F84A4.1253@easystreet.com> (raw)
In-Reply-To: md5:5DC8C3E899C75D983B6B366E4BFCE28C


I have seen one application in which the GOTO statement worked very
well.  The program was a game (text mode, circa 1980) that depicted the
movement of an adventurer through a castle of many chambers.  I was
helping an adolescent who was born after I started programming try to
learn something about propitious techniques for writing software.

Well in that genre, which was very popular amongst people of that age
programming Basic in that era,  the GOTO could be part of a very
well-designed program.  When you went to a chamber of the castle, it
didn't matter where you went there from -- there was no need to ever
RETURN or even to GOBACK.  The program made heavy use of GOTO's, but it
met my definition of well-structured, i.e. the structure of the program
was obviously in accord with the structure of the problem.

This didn't get me to love the GOTO -- I doubt that I've written as many
GOTO's since then as that one program contained.  But, that little kid's
code convinced me that any programming language feature, no matter how
inherently worthless, is likely to be wonderful when used correctly in
the correct situation.  (I'll even allow that a Fortran kind of guy
might have solved the same problem just as elegantly with an FSM using
one or more computed GOTO's)

Al




       reply	other threads:[~1997-06-11  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <md5:5DC8C3E899C75D983B6B366E4BFCE28C>
1997-06-11  0:00 ` Al Christians [this message]
     [not found]   ` <dewar.866202982@merv>
1997-06-13  0:00     ` GOTO Considered Adam Beneschan
1997-06-14  0:00       ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox