Path: utzoo!attcan!uunet!lll-winken!ames!rex!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.misc Subject: Re: The "evil" GOTO (Was: 25 Years of BASIC) Message-ID: <919@twwells.uucp> Date: 11 May 89 22:23:04 GMT References: <1814@ubu.warwick.UUCP> <6540009@hpcupt1.HP.COM> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 32 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <6540009@hpcupt1.HP.COM> jacka@hpcupt1.HP.COM (Jack C. Armstrong) writes: : In all of this GOTO/NOGOTO nonsense, no one seems to have mentioned just : WHY gotos are so ugly - it's not the goto statement that causes readability : problems - is the %&#!$! label! When reading source written by others (or : myself, more than 5 minutes ago) the presense of a label tells me *somebody*, : *somewhere* does a goto to this location. The question is - who? from where? This is all perfectly correct and is implicit in "making the control structures apparent", the point of structured programming. : [N.B. the break and return statements used in C have the same problem, with : the added 'charm' of no explicit label. A goto by any other name.....] But this is a non sequiter. *All* control structures are "goto[s] by any other name". Break and return are very easy to deal with. Return always leaves the current function (you *do* know what that is, right?). Break and continue always leave the innermost loop or switch; provided that you've indented the code correctly, the place the break goes to is immediately obvious. : Cross-listing directories help, but how long do they stay accurate? In the : interest of free speech, I hate to see gotos totally censored, and as an old : Algol 60 hacker from the 60's I avoid them like the plague, but I'll still : stand up for your right to use them judiciously, where needed, but *please* : comment on its use! The coding standard where I work (written by myself) requires this; moreover, when efficiency is the claimed reason, the comment is required to have the timing statistics to prove it. --- Bill { uunet | novavax } !twwells!bill