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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b8b8a54001adc4d2 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Possible Ada deficiency? (goto) Date: 11 Jan 2005 17:15:55 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <1104516913.718856.94090@z14g2000cwz.googlegroups.com> <1104544963.930877.75170@c13g2000cwb.googlegroups.com> <1104595073.731663.180100@c13g2000cwb.googlegroups.com> NNTP-Posting-Host: shell01-e.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1105481755 30837 69.38.147.31 (11 Jan 2005 22:15:55 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 11 Jan 2005 22:15:55 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:7659 Date: 2005-01-11T17:15:55-05:00 List-Id: Peter Hermann writes: > Robert A Duff wrote: > > I don't much like the rules about goto labels. They cause a lot of > > I like them because they are useful. And I don't like them because they are *not* useful. ;-) The main thing I'm thinking about is that goto labels are implicitly declared. The Pascal rule requires an explicit label declaration. That makes the code more readable, because you can see up front that "gotos lurk below", which is a useful thing to know. Even if you think the extra syntactic overhead is annoying, it can't be *very* annoying, because people don't write a lot of gotos. Also, this rule makes the language a little bit harder to learn, because goto labels don't behave like most everything else in the language, which *do* have to be explicitly declared. How many Ada programmers know that the following silly example is illegal: procedure P is begin for Mumble in 1..10 loop <> -- Illegal! null; end loop; end P; but the following equally silly example is legal: procedure P is begin <> for Mumble in 1..10 loop null; end loop; end P; and can explain why? Compiler writers have to work hard to get those little details exactly right, and it's of zero benefit to programmers. > > As a compiler writer, I find it very dissatisfying to do extra work that > > doesn't benefit my user community. > > As a bus driver, I find it very dissatisfying to have those > annoying passengers. If my passengers bought tickets from New York to Boston, I don't like to have a rule saying I have to drive the bus via Los Angeles! ;-) - Bob