🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c.moderated
Article #2178

Re: use of the break statement

#2178
From: M. J. Saltzman
Date: Tue, 05 Mar 1996 03:23
53 lines
2959 bytes
fred@genesis.demon.co.uk (Lawrence Kirby) writes:
>In article <4h81e3$ag5@solutions.solon.com>
>           dale@hal.com "Dale Johannesen" writes:

> > Could we please drop the structured-programming holy war?  People
> > have been talking about this since 1968* without reaching consensus.

>It is important to discuss things like this. Whether people reach consensus
>in the end is not as important as people understanding the issues involved
>and making decisions from an informed position.

> > *E. Dijkstra, "Goto Statement Considered Harmful", CACM, Mar. 1968

If anyone wants to read to original, it is on line at
http://www.acm.org/classics/oct95.

>The trouble is that people too often treat this as gospel (or don't
>understand what it really says) and ignore the wealth of experience
>that has been gained since then. The article that stared this thread
>describes an absolute rule which suggests a lack of research into the
>area. Even Dijkstra accepted that you can write structured programs using
>gotos, they simply don't enforce it.

It's a little difficult to quote out of context (and it's short enough
that anyone who wants to join the discussion should read it all,
twice).  The (in)famous out-of-context quote is:

	...[T]he goto statement should be abolished from all "higher
	level" programming languages (i.e. everything except, perhaps,
	plain machine code).

but the main point of the article (which is actually a letter to the editor
of CACM) is better captured by the quote:

	The goto statement as it stands is just too primitive; it is too much
	an invitation to make a mess of one's program. One can regard and
	appreciate the clauses considered as bridling its use. I do not claim
	that the clauses mentioned are exhaustive in the sense that they will
	satisfy all needs, but whatever clauses are suggested (e.g. abortion
	clauses) they should satisfy the requirement that a programmer
	independent coordinate system can be maintained to describe the
	process in a helpful and manageable way.

The term "coordinate system" refers to a set of items of information
describing the progress of the computation (hence the state of the
program).  I don't know where clauses are "mentioned", but he seems to
be referring to, for example, disciplined use of goto to exit from a
nested loop upon detection of an error condition ("abortion clauses").

-- 
		Matthew Saltzman
		Clemson University Math Sciences
		mjs@clemson.edu
Technical Details
Message-ID: <4hgc42$983@solutions.solon.com>
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
References: <4hdqi0$8om@solutions.solon.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail
From: mjs@hubcap.clemson.edu (M. J. Saltzman)
Newsgroups: comp.lang.c.moderated
Subject: Re: use of the break statement
Date: 4 Mar 1996 21:23:46 -0600
Organization: Clemson University
Sender: clc@solutions.solon.com
Approved: clc@solutions.solon.com
Message-ID: <4hgc42$983@solutions.solon.com>
References: <4hdqi0$8om@solutions.solon.com>
NNTP-Posting-Host: solutions.solon.com
X-Newsreader: NN version 6.5.0 #1