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=0.6 required=5.0 tests=BAYES_20,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11390f,4c42ac518eba0bbe X-Google-Attributes: gid11390f,public X-Google-Thread: 103376,4c42ac518eba0bbe X-Google-Attributes: gid103376,public X-Google-Thread: 109fba,4c42ac518eba0bbe X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,4c42ac518eba0bbe X-Google-Attributes: gid1014db,public From: nozone@sbox.tu-graz.ac.at (ANDREAS LEITNER) Subject: Re: Programming language vote - results Date: 1997/12/02 Message-ID: <6616ej$llt@fstgal00.tu-graz.ac.at>#1/1 X-Deja-AN: 294525539 References: <343fbb5a.0@news.iprolink.ch> <3470EF6E.F74@lysator.liu.se> <879863453snz@genesis.demon.co.uk> <65gaoj$f8u$1@helios.crest.nt.com> Followup-To: comp.lang.ada,comp.lang.apl,comp.lang.c,comp.lang.c++ Organization: Graz University of Technology, Austria Newsgroups: comp.lang.ada,comp.lang.apl,comp.lang.c,comp.lang.c++ Date: 1997-12-02T00:00:00+00:00 List-Id: Names are snipped (dont know who wrote what, sorry) : Whether or not it is appropriate to use a goto depends on the programming : language---namely, what control structures the language supports. : If the language only supports GOTO-like structures, then your choice is : made for you. In other cases it's not that clear. Suppose that you want : to break out of some deeply nested block statement. If your language : supports a ``break N'' statement, to break out of N nesting levels, : or a ``break '' where is the name of the enclosing block : from which you want to jump out, then you will use the break. If you : don't have it, you either use a simple goto, or an extra variable plus a : number : of tests at each level. Well, in my opinion the need to use a goto is in most (if not all) cases a sign that the design or the language lacks. (if (!design lacks) language lacks; :) I think goto debate is not recent anymore is because the majority of people have accepted the fact that goto provide unreadable code. Once we got a "coder" that produced lots of gotos, he was fired not onyl because of gotos but also because of the fact that a different programmer was able to rewrite a function without using one goto and also reducing the size of the function from 60 to 15 lines (as I remember correctly) I think this is the main reason why the goto-argument is not held anymore (or is it help by now?) : How recently have you come across a program that was rotten due to the : abuse of : goto? Is this really a valid concern? Yes, I've debugged a program that rebuild took over 30 minutes. Here to use the trail and error aproach to get an idea of the code costs too much time and money. (And is anoing) -- ANDREAS LEITNER alias nozone@sbox.tu-graz.ac.at