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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,86fd56abf3579c34 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-23 16:50:29 PST Path: nntp.gmd.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!news.uni-stuttgart.de!rz.uni-karlsruhe.de!xlink.net!howland.reston.ans.net!news.sprintlink.net!cs.utexas.edu!swrinde!gatech!newsfeed.pitt.edu!uunet!in1.uu.net!boulder!news.coop.net!news.den.mmc.com!iplmail.orl.mmc.com!usenet From: Theodore Dennison Newsgroups: comp.lang.ada Subject: Re: Should internet support software be written in Ada? Date: 23 Mar 1995 15:05:39 GMT Organization: IPL InterNetNews site Message-ID: <3ks2o3$bab@theopolis.orl.mmc.com> References: <3kaksj$iur@isnews.calpoly.edu> <3ki9t8$c8l@Starbase.NeoSoft.COM> NNTP-Posting-Host: payday.orl.mmc.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-URL: news:3ki9t8$c8l@Starbase.NeoSoft.COM Date: 1995-03-23T15:05:39+00:00 List-Id: David Weller > In article <3kaksj$iur@isnews.calpoly.edu>, > Bill Brooks wrote: > > while(!(getline(input,MAXLINE,fp))) { > > char confname[MAXLINE]; > > if((input[0] == '#') || (!input[0])) > > continue; > > for(i=0;isname(input[i]) && (input[i] != ':');i++) > > confname[i] = input[i]; > > confname[i] = '\0'; > > if(!strcmp(confname,mapname)) > > goto found; > > } > >In the rich tradition of discussing good software engineering practices in > >c.l.a(regardless of language) I'll ask: is this good coding style? > >Keep in mind that this code was written under the auspices of one of > >the top 5 schools in CS in the United States. > At the risk of exposing myself as some sort of heretic, the above > code example looks perfectly "normal" to me. That's one of the nasty > little problems about C, it makes "dense" code "normal". Some may I think the problem he has with this (at least the problem I have with it) is not that it dense, or even that it is C. It think the problem is the "goto" statements. (At least, that's my problem with it). Now, I too have seen some bad C code in my time. But this is the first I have EVER seen anyone actually use a "goto". In a language with a good selection of looping constructs like C, there is NO excuse for this. (Well, perhaps stupidity...) There, That ought to get the flames going! T.E.D.