comp.lang.ada
 help / color / mirror / Atom feed
From: Charles Hixson <charles@earthlink.net>
Subject: Re: No Go To's Forever!
Date: 2000/03/22
Date: 2000-03-22T00:00:00+00:00	[thread overview]
Message-ID: <38D9328A.EB464D75@earthlink.net> (raw)
In-Reply-To: 38D92246.9B53E842@pacbell.net

"Michael P. Walsh" wrote:

>  -- snip
>
> People are quite capable of writing good code in assembly
> language, but it is likely to be quite hard to read and
> understand unless it is well commented.
>
> -- snip

It is true that nearly any computer language creates the possibility
of writing well structured code.  The problem come from a little thing
that Linguists call Zipf's law.  Basically it says that people prefer
to do things that are easy, and language tends to structure itself to
make easy those things that people do frequently.

At this point I tend to apply the weak form of Whorf's law, which
states (essentially) if there are two ways to think about something,
people will tend to choose to think about it in the way most
harmonious with their most familiar linguistic habits.

In other words, if you get into the habit of using goto's, you will
tend to become more comfortable with using them.  And if it is twice
as hard to write well structured code, you will tend to write
unstructured code.

To elaborate on the matter, if code is written first in a quick and
dirty fashion, with the intention of cleaning it up once you get it
working, it will probably never get cleaned.  So the better
environment  is the one that makes it easy to write it correctly the
first time.  I don't like goto label constructs unless the label MUST
be attached to a well-marked feature, like the beginning or end of a
loop or routine, and those feature had better be well marked for manyn
other reasons than the goto label.  If the label just happens to be at
the start or end of the routine, and not attached to it, then it might
be advantageous to insert intervening statements for cleanup or
initialization.  And they may become modified by code repairs.  And
all of a sudden you notice that the code doesn't look very structured
at all.  Let's just get off this slope!  I support continue <label>
and break <label> where the label is on a block, preferably at both
the beginning and the end.  GoTo <label> is a much too general
substitute.

The whole purpose of this is to cause the code that is written to be
more legible, both later and at the time!

-- Charles Hixson
-- charleshixson@earthling.net







  reply	other threads:[~2000-03-22  0:00 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-21  0:00 No Go To's Forever! Bill Dale
2000-03-21  0:00 ` Charles Hixson
2000-03-21  0:00   ` Robert Dewar
2000-03-21  0:00     ` Michael P. Walsh
2000-03-21  0:00       ` Andrew Berg
2000-03-22  0:00         ` Wes Groleau
2000-03-22  0:00           ` No Go To's Forever! (I'm sorry I spoke...) dis90072
2000-03-23  0:00             ` tmoran
2000-03-23  0:00               ` Larry Kilgallen
2000-03-22  0:00     ` No Go To's Forever! Ken Garlington
2000-03-22  0:00       ` Marin D. Condic
2000-03-22  0:00         ` Roger Barnett
2000-03-22  0:00           ` Larry Kilgallen
2000-03-23  0:00             ` Robert Dewar
2000-03-23  0:00         ` Keith Thompson
2000-03-24  0:00           ` Marin D. Condic
2000-03-24  0:00           ` Ted Dennison
2000-03-27  0:00             ` Keith Thompson
2000-03-28  0:00               ` Come From Forever! (was: No Go To's Forever!) Ted Dennison
2000-03-29  0:00                 ` Keith Thompson
2000-03-25  0:00           ` No Go To's Forever! Richard D Riehle
2000-03-21  0:00   ` Gautier
2000-03-22  0:00   ` Tim Gahnström
2000-03-21  0:00     ` David Starner
2000-03-22  0:00     ` Robert Dewar
2000-03-22  0:00       ` Ken Garlington
2000-03-21  0:00         ` Keith Thompson
2000-03-22  0:00         ` Robert Dewar
2000-03-22  0:00         ` Robert Dewar
2000-03-23  0:00           ` Ken Garlington
2000-03-23  0:00       ` Tim Gahnstr�m
2000-03-22  0:00     ` tmoran
2000-03-22  0:00       ` Robert Dewar
2000-03-22  0:00         ` tmoran
2000-03-23  0:00           ` Robert Dewar
2000-03-23  0:00             ` tmoran
2000-03-23  0:00               ` Robert Dewar
2000-03-23  0:00                 ` Jeff Carter
2000-03-24  0:00                   ` Robert Dewar
2000-03-23  0:00                 ` tmoran
2000-03-24  0:00                   ` Robert Dewar
2000-03-24  0:00                     ` Robert Dewar
2000-04-16  0:00                     ` Kenneth Almquist
2000-04-17  0:00                       ` Robert Dewar
2000-04-17  0:00                       ` Robert Dewar
2000-04-18  0:00                         ` Dale Stanbrough
2000-04-18  0:00                           ` Robert Dewar
2000-04-18  0:00                           ` David Starner
2000-03-29  0:00                 ` Martin Dowie
2000-03-29  0:00                   ` Robert Dewar
2000-03-29  0:00                   ` Florian Weimer
2000-03-29  0:00                     ` Robert Dewar
2000-03-30  0:00                       ` Robert A Duff
2000-04-01  0:00                         ` Robert Dewar
2000-04-01  0:00                           ` Robert A Duff
2000-04-02  0:00                             ` Robert Dewar
2000-04-21  0:00                       ` Florian Weimer
2000-04-21  0:00                         ` Robert Dewar
2000-03-29  0:00                   ` Robert Dewar
2000-03-24  0:00         ` tmoran
2000-03-21  0:00 ` David Starner
2000-03-21  0:00   ` Bill Dale
2000-03-22  0:00     ` Robert Dewar
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00     ` Roger Barnett
2000-03-22  0:00       ` Charles Hixson
2000-03-22  0:00     ` Robert A Duff
2000-03-22  0:00     ` Paul Graham
2000-03-22  0:00       ` Robert Dewar
2000-03-22  0:00         ` Brian Rogoff
2000-03-22  0:00           ` Ted Dennison
2000-03-22  0:00             ` Michael P. Walsh
2000-03-23  0:00           ` Robert Dewar
2000-03-22  0:00         ` Michael P. Walsh
2000-03-22  0:00           ` Charles Hixson [this message]
2000-04-06  0:00             ` Wes Groleau
2000-04-07  0:00               ` Charles Hixson
2000-03-22  0:00         ` Paul Graham
2000-03-23  0:00           ` Robert Dewar
2000-03-23  0:00             ` Ted Dennison
2000-03-23  0:00               ` Paul Graham
2000-03-23  0:00                 ` Robert Dewar
2000-03-23  0:00               ` Robert Dewar
2000-03-23  0:00               ` Larry Kilgallen
2000-03-22  0:00 ` Richard D Riehle
2000-03-23  0:00   ` Jeff Carter
2000-03-23  0:00     ` Michael P. Walsh
2000-03-23  0:00       ` Brian Rogoff
2000-03-23  0:00     ` Robert Dewar
2000-03-22  0:00 ` Marin D. Condic
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00     ` Jon S Anthony
2000-03-22  0:00       ` Roger Barnett
2000-03-23  0:00         ` Robert Dewar
2000-03-23  0:00           ` Roger Barnett
2000-03-24  0:00             ` Robert Dewar
2000-03-23  0:00       ` Robert Dewar
2000-03-22  0:00         ` Jon S Anthony
2000-03-22  0:00   ` Robert Dewar
2000-03-22  0:00   ` Robert Dewar
2000-03-23  0:00   ` Chris Morgan
2000-03-22  0:00 ` Pascal Obry
     [not found] ` <01bf9436$9c054880$2c5101be@bthomas4663>
2000-03-23  0:00   ` Ken Garlington
2000-03-23  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