Article View: comp.lang.misc
Article #24Re: A challenge to the anti-goto Was: Re: Hardware Support for Numeric Algorithms
From: Ted Stockwell
Date: Sat, 31 Oct 1992 16:50
Date: Sat, 31 Oct 1992 16:50
38 lines
1965 bytes
1965 bytes
[much deleted]
> labelh: b >>= 1; j = ...]
> if(j==0 || j==i)goto labelh;
> i = j;
From this little snippet it is clear that you are not thinking about
structured programming. The goto gains you nothing here. This could
be:
do
{
b >>= 1; j = ;
}
while (j==0 || j==i);
i = j;
You may claim that your use of goto is obvious, but the structure is
easily lost, especially if the body of the loop has more than a couple
of statements.
[much deleted]
> Now I suspect that anyone not brainwashed, and knowing that braces are used to
Please try not to be so inflammatory.
No. I am not brainwashed. I approach the problem from a a different
background and point of view. I use structured methods to make the
meaning of the code obvious. If performance is a problem, I will
profile the code and tune what ever needs attention. Before any time
is wasted make the source code tight and obscure, one must ensure that
the best available algorithm is being used. This can be a much bigger
win than code tweaking.
--
Ted Stockwell ted@cs.umn.edu
--
Ted Stockwell ted@cs.umn.edu
Technical Details
Message-ID:
<TED.92Oct31105029@unity.cs.umn.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!spool.mu.edu!umn.edu!cs.umn.edu!tedReferences:
<BwJ4uz.1rA@rice.edu> <1992Oct23.004313.29196@ntuix.ntu.ac.sg> <1992Oct29.153514.22927@yrloc.ipsa.reuter.COM> <BwxsF6.3DF@mentor.cc.purdue.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ogicse!uwm.edu!spool.mu.edu!umn.edu!cs.umn.edu!ted From: ted@cs.umn.edu (Ted Stockwell) Newsgroups: comp.lang.misc Subject: Re: A challenge to the anti-goto Was: Re: Hardware Support for Numeric Algorithms Message-ID: <TED.92Oct31105029@unity.cs.umn.edu> Date: 31 Oct 92 16:50:29 GMT Article-I.D.: unity.TED.92Oct31105029 References: <BwJ4uz.1rA@rice.edu> <1992Oct23.004313.29196@ntuix.ntu.ac.sg> <1992Oct29.153514.22927@yrloc.ipsa.reuter.COM> <BwxsF6.3DF@mentor.cc.purdue.edu> Sender: news@news2.cis.umn.edu (Usenet News Administration) Organization: Minnesota Hackers' Guild Lines: 38 In-Reply-To: hrubin@pop.stat.purdue.edu's message of Fri, 30 Oct 1992 13:35:30 GMT Nntp-Posting-Host: unity.cs.umn.edu