home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.arch:10429 comp.lang.misc:3507
- Newsgroups: comp.arch,comp.lang.misc
- Path: sparky!uunet!ferkel.ucsb.edu!taco!rock!stanford.edu!agate!linus!linus.mitre.org!gauss!bs
- From: bs@gauss.mitre.org (Robert D. Silverman)
- Subject: Re: A challenge to the anti-goto (C code included!)
- Message-ID: <1992Nov5.203759.8030@linus.mitre.org>
- Sender: news@linus.mitre.org (News Service)
- Nntp-Posting-Host: gauss.mitre.org
- Organization: Research Computer Facility, MITRE Corporation, Bedford, MA
- References: <BwxsF6.3DF@mentor.cc.purdue.edu> <1992Nov3.053951.7786@cognos.com>
- Date: Thu, 5 Nov 1992 20:37:59 GMT
- Lines: 50
-
- In article <1992Nov3.053951.7786@cognos.com> alanm@cognos.com (Alan Myrvold) writes:
- :In article <BwxsF6.3DF@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
- :>Put in any short code you want for the ... I doubt that the code
- :>as written is legal C with the missing parts inserted.
- :>
- :>extern B;
- :>n = 0; m = 0; b = B;
- :>{goto start;
- :> case 1: n += 1;
- :> case 3:
- :
- :There are always these goals when programming:
- : 1) The program should communicate its intention clearly to a human reader
- : 2) The progran should communicate its intention efficiently to the machine
- : 3) The program should be portable across hardware / software changes
- :Given the code fragment you posted, I would suggest, Dr. Rubin, that you
- :spend less time on #2, and more time on #1.
- :
- I would suggest Mr. Myrvold, that you attend to your business and let
- Dr. Rubin attend to his.
-
- Stop telling him what his business should be. You assertion:
-
- "There are AWAYS"
-
- is dogmatic and wrong, because not everyone has the same objectives
- as you. Dr. Rubin's main rule is:
-
- "The code should run as fast as possible"
-
- For him, all other considerations are secondary. Who are you to tell
- him what his priorities should be?
-
- Just to further contradict your dogma, let me point out that portable
- code for doing multiple-precision arithmetic that runs well on one
- architecture can run like total dogshit (pardon my vulgarity) on
- another. Sometimes, portability is a very minor issue. The absence or
- presence of a single machine instruction can sometimes give dramatically
- different results.
-
- There are times when readability, portability, and ease of maintenance are
- of primary importance. There are times when they don't matter at all. Stop
- pretending that they are the end-all of good coding.
-
-
- --
- Bob Silverman
- These are my opinions and not MITRE's.
- Mitre Corporation, Bedford, MA 01730
- "You can lead a horse's ass to knowledge, but you can't make him think"
-