home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / ada / 3772 < prev    next >
Encoding:
Text File  |  1992-12-21  |  2.8 KB  |  61 lines

  1. Newsgroups: comp.lang.ada
  2. Path: sparky!uunet!seas.gwu.edu!mfeldman
  3. From: mfeldman@seas.gwu.edu (Michael Feldman)
  4. Subject: Re: C++ vs. Ada -- Is Ada loosing?
  5. Message-ID: <1992Dec18.214831.3177@seas.gwu.edu>
  6. Sender: news@seas.gwu.edu
  7. Organization: George Washington University
  8. References: <11330@prijat.cs.uofs.edu> <172@fedfil.UUCP> <16269@goanna.cs.rmit.oz.au>
  9. Date: Fri, 18 Dec 1992 21:48:31 GMT
  10. Lines: 49
  11.  
  12. In article <16269@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
  13. >
  14. >My current impression is that Ada textbooks tend to be more accurate in
  15. >the claims they make about what is or is not valid Ada, and tend to have
  16. >a higher level view of the software process, than C books.  Is this an
  17. >illusion, due to my knowing C relatively better than I know Ada?
  18. >
  19. This is not an illusion. Ada books were - in the bad old days - full of
  20. errors because nobody had good compilers around to test their code with.
  21. Now that everyone has correct compilers (as least as far as validation
  22. can show them correct), we can test our stuff.
  23.  
  24. My data structures book (1985) had lots of errors in the code, but these
  25. were either _algorithm_ errors or "version control" problems where the
  26. pieces did not fit together correctly because of author and publisher
  27. carelessness. None were "Ada errors" or nonportabilities.
  28.  
  29. My freshman book (1991) had a lot of typos when it first came out, but
  30. these were in the _text_ - misspellings and inconsistencies in the
  31. English, tables, blah blah. Lots of UW students got to point out these
  32. errors during my year in Seattle; I paid $1.00 for the first report of
  33. each error.
  34.  
  35. There were a few algorithm errors and other quibbles that had nothing to do
  36. with Ada. And ONE nonportability: there are two programs in which I made
  37. a bad assumption about float-to-integer conversion, so the programs will
  38. give different results depending on whether the float is truncated or rounded
  39. where the fractional part is in the middle of the interval. This is 2 
  40. programs of 180, and the error was my own stupidity.
  41.  
  42. I tested (nearly) everything under at least 4 compilers, and other
  43. adopters of the book are using any number of other compilers that I
  44. don't have access to. I have yet to get a report of a portability bug
  45. in any one of them; indeed, I am not getting bug reports at all.
  46. The book includes a diskette of all the programs, so nobody ever has to
  47. endure a keying error to use them.
  48.  
  49. The purpose of this is not to hype the book, but just to point out
  50. how easy it is to develop Ada code that'll really be compiler-independent,
  51. given today's compilers and programs that don't use a lot of Chapter 13
  52. stuff (you wouldn't find that in a freshman book!).
  53.  
  54. You might quibble with an author's coding style, or choice of algorithm,
  55. but these days you'll have to work very hard to find a language error
  56. in today's Ada books.
  57.  
  58. Mike Feldman
  59.  
  60. PS - My $1.00 per error still stands.
  61.