home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #23 / NN_1992_23.iso / spool / misc / writing / 3115 < prev    next >
Encoding:
Internet Message Format  |  1992-10-08  |  4.0 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!haven.umd.edu!mimsy!nocusuhs!yoshi
  2. From: yoshi@nocusuhs.nnmc.navy.mil (D M Yoshikami)
  3. Newsgroups: misc.writing
  4. Subject: Re: Semantics of "to be"
  5. Summary: About GOTO's -- here he goes AGAIN!!!!!!!!!  :-)
  6. Keywords: GOTO, ISness, IZZY, Foo!
  7. Message-ID: <1992Oct8.124116.1424@nocusuhs.nnmc.navy.mil>
  8. Date: 8 Oct 92 12:41:16 GMT
  9. References: <1992Oct6.152841.13733@bcrka451.bnr.ca> <1992Oct7.115201.11214@nocusuhs.nnmc.navy.mil> <1992Oct7.170022.6141@bcrka451.bnr.ca>
  10. Organization: National Naval Medical Center
  11. Lines: 61
  12.  
  13. In article <1992Oct7.170022.6141@bcrka451.bnr.ca> nadeau@bnr.ca (Rheal Nadeau) writes:
  14. >This reminds of the great "goto" debate in computer programming - it is
  15. >generally believed that programs written without "goto" are "better"
  16. >than those with.  However, it is still quite possible to write very bad
  17. >programs without "goto", and very good ones with "goto".  The most that
  18. >can be said is that "goto" make it easier to do sloppy programming (oh,
  19. >I forgot this condition, OK, I'll just "goto" over-there and . . .).
  20.  
  21. This reminds me of when I was studying compiler theory.  When you are
  22. implementing a finite automaton of some kind, when you change states,
  23. you do a "goto" in every sense of the word.  Although structured
  24. programming and goto's (after IF statements) are equal in terms of
  25. expressing flow control, to the astute person reading the code they
  26. are not identical in terms of usage.  The upshot of this is you can
  27. implement a pushdown automaton (for example), completely with
  28. structures, but you'd wind up simulating a GOTO in the end, just as
  29. much as you can implement structures with GOTO's (this is what the
  30. compiler does for you -- simulates your structures with Jumps in the
  31. machine code).  Finite automata look like spaghetti code, and the best
  32. way to implement spaghetti code is with spaghetti code.
  33.  
  34. One problem is that young programmers often do not have sufficient 
  35. understanding or knowledge to know when it is legal to use a GOTO.
  36. Oddly enough, sometimes designers of computer languages do not
  37. recognise this either.  Ada, for instance, does not really have a
  38. "GOTO" that is easily used, and more is the shame, because programmers
  39. often abuse the Ada "Exception" handler to emulate GOTO's, which
  40. slows things down quite a bit.  [What they write are not really
  41. exceptions, but attempts to force Ada to "GOTO" somewhere because
  42. the machine's state has changed]
  43.  
  44. >In the end, the key is thinking through what you want to say, then
  45. >finding the words that best convey that messages.  (And while the
  46. >previous sentence uses "is", I doubt it would really be improved by
  47. >trying to avoid that.  Or:  I doubt we could really improve it by
  48. >trying to avoid that?  :-) )
  49.  
  50. Okay, let's bring this all together.  Finding any old word to convey
  51. the message will do so -- much as lotsa-Goto's can implement something
  52. better off written in structures, and just as a program written in
  53. a highly structured language can implement a gigantic mess of Goto's
  54. for some kind of scanner or parser -- but finding the right words
  55. to do the right job that will best message is indeed the key.
  56.  
  57. Although we need not necessarily agree with some of the more extremes of
  58. eliminating "IS" from English, much like the mistake of eliminating
  59. the "GOTO" entirely from computer languages, the argument about using "IS"
  60. much like the argument regarding the "GOTO", allows us to check if our
  61. diction is precise or sloppy -- in other words, did we misuse the verb
  62. "to be" or not?
  63.  
  64. D.Y.  :-)
  65.  
  66. P.s.  It may seem strange, but I've noticed that computer languages,
  67. follow the same rhetorical guidelines for usage and expression as
  68. natural languages such as English.  Q.v. _The_Elements_of_Programming_Style_
  69.  
  70. =-=-=-=-=-=-=-=-=-=-=-=-=-=+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  71. D M Yoshikami  :-) ;-) :-) | Internet: yoshikami@usuhsb.ucc.usuhs.nnmc.navy.mil
  72.      +1 (301) 295-3304     | Bitnet  : yoshikami@usuhsb.bitnet
  73. ***  !!xob X*NU V METSYS T&TA eht ni renosirp dleh gnieb m`I  !pleH  !pleH  ***
  74.