Xref: utzoo misc.misc:6046 comp.misc:6030 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!shadooby!accuvax.nwu.edu!tank!ncar!unmvax!tut.cis.ohio-state.edu!rutgers!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: misc.misc,comp.misc Subject: Re: The "evil" GOTO (Was: 25 Years of BASIC) Message-ID: <8417@chinet.chi.il.us> Date: 9 May 89 15:50:02 GMT References: <1814@ubu.warwick.UUCP> <13113@lanl.gov> <2854@cps3xx.UUCP> <4383@ttidca.TTI.COM> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Followup-To: misc.misc Organization: Chinet - Public Access Unix Lines: 31 In article <4383@ttidca.TTI.COM> hollombe@ttidcb.tti.com (The Polymath) writes: >Where the break goes is _very_ specific. It gets you out of the innermost >containing loop (or switch). Where a goto goes is _anywhere_ it damn well >wants to. I'd much rather match up a few braces (which, in _my_ coding >standard, are aligned vertically on the page) than search through thousands >of lines of code for a goto label. Not to mention finding such a label in >the middle of a program and wondering how many goto statements go to it >and where they are. Who uses paper anymore? Any editor worth loading can find all the references to a label faster than you can determine if a "break" is inside of a switch or not (assuming you were bright enough to make the label a unique piece of text). I wish someone would re-think programming languages in the context of intelligent editors. I would really like to see "named" enclosing braces like this: if (foo) {:foo-cond while (bar < 2) {:bar-loop do_something(); bar++; }:bar-loop }:foo-cond where bar-loop and foo-cond are arbitrary and optional text that must match at the start and end. Ordinarily I don't like extra verbosity but sometimes I get the feeling I'm in a maze of twisty {}'s, that all look alike. This would also allow a reasonable diagnostic from lint or the compiler when a brace is misplaced. Can't we forget about the days of paper-tape and punch cards? Les Mikesell