Date: Thu, 13 May 2010 12:28:20 -0400
Reply-To: Lex Jansen <spam@LEXJANSEN.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Lex Jansen <spam@LEXJANSEN.COM>
Subject: Re: Alternative for "goto" in do loop
Content-Type: text/plain; charset=ISO-8859-1
Here is another paper:
Go To Statement Considered Harmful
Edsger W. Dijkstra
http://www.u.arizona.edu/~rubinson/copyright_violations/Go_To_Considered_Ha
rmful.html
On Thu, 13 May 2010 12:05:57 -0400, S=?ISO-8859-1?Q?=C3=B8ren?= Lassen
<s.lassen@POST.TELE.DK> wrote:
>Perusing Knuths execellent paper
>http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf
>(Thank you, Michael!), I stumbled upon this little gem:
>
>"Of course, event indicators are not the only decent alternatives to go to
>statements that have been proposed. Many authors have suggested language
>features which provide roughly equivalent facilities, but which are
>expressed in terms of exit, jumpout, break, or leave statements. Kosaraju
>[57] has proved that such statements are sufficient to express all
programs
>without go to's and without any extra computation, but only if an exit
from
>arbitrarily many levels of control is permitted."
>
>Which seems to vindicate my personal GOTO policy quite adequately, namely
>that GOTOs can be used instead of LEAVE when you need to break out of
several
>levels of nested loops, and (in SAS) STOP or DELETE(/RETURN) is too
drastic.
>
>Thanks to you all for an entertaining and enlightening discussion!
>Søren
|