home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10429 < prev    next >
Encoding:
Internet Message Format  |  1992-11-06  |  2.5 KB

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