From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,99222a5bd46ef3c9 X-Google-Attributes: gid103376,public From: nobody@REPLAY.COM (Anonymous) Subject: Re: GOTO considered necessary (reworked) Date: 1997/06/16 Message-ID: <199706161352.PAA27178@basement.replay.com>#1/1 X-Deja-AN: 248826598 References: <5nn2fm$11dk$1@prime.imagin.net> Organization: Replay and Company UnLimited X-001: Replay may or may not approve of the content of this posting Mail-To-News-Contact: postmaster@nym.alias.net X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Newsgroups: comp.lang.ada Date: 1997-06-16T00:00:00+00:00 List-Id: <199706121410.QAA05823@basement.replay.com> On 12 Jun 1997 13:04:05 -0400, dewar@merv.cs.nyu.edu (Robert Dewar) wrote: > Jeff Carter responded to Sam's article with a typical bunch of dogmatic > never-use-gotos stuff that smacks of the fanaticism that was popular in > the 70's, but I would have hoped had disappeared by now. Yes, that would explain why I did *not* object to the FSM example. I'm sorry to see this typical dogmatic never-say-never-use-gotos stuff that smacks of fanaticism from you :) > > Anyway Sam, take this as a vote from me that your treatment is very nice, > and just at the right level of dont-use-goto-except-where-useful. > > I particularly object to Jeff's notion that introducing miscellaneous > boolean flags to replace structured use of gotos (like the CONTINUE) > makes code more readable. Far from it in my opinion, The use of Boolean's > to encode state that is more reasonably and clearly encoded in the program > counter is a big mistake in my opinion, and can often severely damage > readability in these rare cases we are talking about. I think I did not introduce any Boolean flags. I certainly did not introduce one in the continue example. I introduced a condition because the example, as given, was meaningless. On continue, I find it interesting that Kernighan & Plauger included continue in ratfor, and ever once used it in _Software Tools_. (I speak from memory, so please correct me if I'm wrong.) My point on all cases was that goto introduces an increased likelihood of error on modification, and all of these cases had an alternative that was as clear as the goto version, but eliminated that increased chance of error. Of course, at some point clarity becomes a taste issue, so you may claim that my versions are not as clear as the versions with goto, IYNSHO. Jeff Carter PGP:1024/440FBE21 My real e-mail address: ( carter @ innocon . com ) "Now go away, or I shall taunt you a second time." Monty Python & the Holy Grail Posted with Spam Hater - see http://www.compulink.co.uk/~net-services/spam/