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