🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #6259

Re: Structured loops (WAS:Re: Turing programming language.)

#6259
From: Jack Campin
Date: Fri, 27 Jan 1989 11:34
32 lines
1971 bytes
pardo@cs.washington.edu (David Keppel) wrote:
  >>[Ongoing discussion of Turing loop structure]
  
>  There is a more general construct that I've not seen in any existing
>  programming languages, although (a) doubtless it exists and (b) the
>  idea is easily a decade old (ok, probably 30, but I *know* at least
>  10) Substitute your favorite C/Pascal/Lisp/Smalltalk syntax.  In
>  meta-Algol:
  
>  	do ... while boolean ... od;

This construct exists in S- (and PS-) algol, and I find it one of the less
lovable features of those languages.  The actual syntax is

	repeat	<void statement>
	while	<boolean valued statement>
	do	<void statement>

where either the repeat-part or the do-part may be omitted.

The problem is that if you're reading a piece of alien code and you see a
"while <boolean>", you have no idea whether it's the beginning, middle, or end
of a control construct without scanning a LOT of surrounding context.  The
construct itself is fine; economizing on keywords like this in the concrete
syntax isn't.

-- 
Jack Campin  *  Computing Science Department, Glasgow University, 17 Lilybank
Gardens, Glasgow G12 8QQ, SCOTLAND.    041 339 8855 x6045 wk  041 556 1878 ho
INTERNET: jack%cs.glasgow.ac.uk@nss.cs.ucl.ac.uk    USENET: jack@glasgow.uucp
JANET: jack@uk.ac.glasgow.cs     PLINGnet: ...mcvax!ukc!cs.glasgow.ac.uk!jack
Technical Details
Message-ID: <2294@crete.cs.glasgow.ac.uk>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!strath-cs!glasgow!jack
References: <11@euteal.UUCP> <89Jan20.111000est.4328@turing.toronto.edu> <12@euteal.UUCP> <7053@june.cs.washington.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!strath-cs!glasgow!jack
From: jack@cs.glasgow.ac.uk (Jack Campin)
Newsgroups: comp.lang.misc
Subject: Re: Structured loops (WAS:Re: Turing programming language.)
Message-ID: <2294@crete.cs.glasgow.ac.uk>
Date: 27 Jan 89 11:34:08 GMT
References: <11@euteal.UUCP> <89Jan20.111000est.4328@turing.toronto.edu> <12@euteal.UUCP> <7053@june.cs.washington.edu>
Reply-To: jack@cs.glasgow.ac.uk (Jack Campin)
Organization: COMANDOS Project, Glesga Yoonie, Unthank
Lines: 32