home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / ada / 3904 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  2.4 KB

  1. Path: sparky!uunet!olivea!charnel!rat!usc!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!mksol!mccall
  2. From: mccall@mksol.dseg.ti.com (fred j mccall 575-3539)
  3. Newsgroups: comp.lang.ada
  4. Subject: Re: An Ada Program Does What It Says?
  5. Message-ID: <1993Jan6.215758.10007@mksol.dseg.ti.com>
  6. Date: 6 Jan 93 21:57:58 GMT
  7. References: <9301031530.AA17787@ajpo.sei.cmu.edu> <1993Jan4.082827.11773@hellgate.utah.edu>
  8. Organization: Texas Instruments Inc
  9. Lines: 45
  10.  
  11. In <1993Jan4.082827.11773@hellgate.utah.edu> matwood%peruvian.cs.utah.edu@cs.utah.edu (Mark Atwood) writes:
  12.  
  13. >In article <9301031530.AA17787@ajpo.sei.cmu.edu>, SAHARBAUGH@ROO.FIT.EDU writes:
  14. >>I searched B&M's book and noted each example program whose 
  15. >>output is "indeterminate" or "implementation dependent".  I 
  16. >>noted the page number on which the answer appears.  
  17.  
  18. >(deleted)
  19.  
  20. >>My warning stands.  Ada code looks deceptively readable.  The 
  21. >>reader must understand the language translator and the 
  22. >>runtime environment to be able to correctly read an Ada 
  23. >>program.
  24.  
  25. >I just finished reading those books, and yes there do seem to be a lot of
  26. >indeterminate and compiler dependent "thing" in the Ada standard.  A co-
  27. >worker and I discussed it for a while and made the observation that probably
  28. >every language has these "gotcha"'s, they just aren't as well documented
  29. >or understood.
  30.  
  31. >Stuff like expression ordering, floating point representation, concurency,
  32. >etc, will always be indeterminate.
  33.  
  34. >Not to trigger yet another C vs Ada flamefest, but this expression in
  35. >C is a classic example...
  36.  
  37. >  r = (i++ == ++i)
  38.  
  39. It is also, of course, quite well documented and understood.  You are
  40. correct in stating that just about every language is going to have
  41. syntactically correct constructs which produce undefined or
  42. implementation-defined results.  You are, however, incorrect in your
  43. assumption that Ada is the only language in which these things are
  44. well documented or understood.
  45.  
  46. [One typically sees a lot more people making mistakes like that above
  47. in C simply because one sees a lot more inadequately or untrained
  48. people working in C than one sees working in Ada -- and we're back to
  49. the 'popularity' issue.]
  50.  
  51. -- 
  52. "Insisting on perfect safety is for people who don't have the balls to live
  53.  in the real world."   -- Mary Shafer, NASA Ames Dryden
  54. ------------------------------------------------------------------------------
  55. Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.
  56.