Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.c Subject: Re: gotos Message-ID: <2618@bsu-cs.UUCP> Date: 13 Apr 88 18:49:51 GMT References: <1988Apr11.201934.20594@utzoo.uucp> <451@goofy.megatest.UUCP> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 20 Summary: What Knuth says In article <451@goofy.megatest.UUCP> djones@megatest.UUCP (Dave Jones) writes: >I only stated that the importance which some people place >on avoiding the gotos is exceedingly exaggerated, and that time spent >campaigning against its use is misspent. This is indeed very true. It is not always wise to simply criticize gotos instead of asking why a goto was necessary. It could be lousy algorithm design or, more commonly than you think, less-than-perfect programming language design. Some things are best done with a goto! And I know of no language, with the possible exception of Ada, that is rich enough in control structures to always have an elegant and efficient alternative to using a goto. The best collection of thoughts I have seen on this issue is by Donald Knuth, entitled "Structured Programming with goto Statements", originally published in one of the ACM journals (probably Computing Surveys) circa 1974 and republished by Prentice Hall in 1977 in "Current Trends in Programming Methodology" volume I, edited by Raymond T. Yeh. -- Rahul Dhesi UUCP: !{iuvax,pur-ee,uunet}!bsu-cs!dhesi