Article View: comp.lang.logo
Article #299Re: GOTO in Logo (was: MicroSoft Windows LOGO Version 3.X)
From: Brian Harvey
Date: Sat, 12 Dec 1992 00:13
Date: Sat, 12 Dec 1992 00:13
26 lines
2021 bytes
2021 bytes
rslade@cue.bc.ca (Rob Slade) writes: >One of the chief benefits of Logo, in my experience, is that the use of it >somehow improves and directs programming "style", regardless of the prior >experience with other languages. I have not analysed this in detail, but >I firmly believe that the programming "contructs" (and syntax) of Logo have >a lot to do with it, including the absence of GOTO. I hate GOTO, too, but actually it's only quite recently that there have been Goto-less Logos. Apple Logo and IBM Logo, for example, both had goto (it was called GO). The Logo version of goto is really pretty limited, since it only works within a single procedure. This is both good and bad; the good side is that you can't write *really* awful code with Logo GO, but the bad side is that long-range jumps are what one mostly wants goto for! Things within a procedure can usually be done just as well with some iterative mechanism. On the other hand, Logo does have two goto-like constructs that can be used to write spaghetti code if you try hard. One is CATCH and THROW, which provide a nonlocal exit facility. The other is tail calling! I've seen plenty of Logo programs in which each procedure ended by calling another procedure. In effect, the procedures were used as code blocks linked by goto. No procedure ever returned to its caller. So, I agree that leaving goto out of Logo is no big loss, but neither does it ensure well-organized programs.
Technical Details
Message-ID:
<1gbaqqINNlrs@agate.berkeley.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!anarres.CS.Berkeley.EDU!bhReferences:
<mills.723711536@dialup.athena.lkg.dec.com> <1992Dec11.205802.12388@softwords.bc.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!ames!agate!anarres.CS.Berkeley.EDU!bh From: bh@anarres.CS.Berkeley.EDU (Brian Harvey) Newsgroups: comp.lang.logo Subject: Re: GOTO in Logo (was: MicroSoft Windows LOGO Version 3.X) Date: 12 Dec 1992 00:13:14 GMT Organization: University of California, Berkeley Lines: 26 Message-ID: <1gbaqqINNlrs@agate.berkeley.edu> References: <mills.723711536@dialup.athena.lkg.dec.com> <1992Dec11.205802.12388@softwords.bc.ca> NNTP-Posting-Host: anarres.cs.berkeley.edu Keywords: logo, blasphemy