From: jldh@sei.cmu.edu (Jorge Luis Diaz-Herrera) Newsgroups: comp.lang.ada Date: Wed, 12 Jan 1994 13:59:33 EST Organization: The Software Engineering Institute (SEI) | Wouldn't you find it more useful if [the program you have | downloaded] worked the first time? If you could use it without | spending hours finding all the bugs? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is exactly the issue. Ada actively prevents you from falling into this! (Isn't it a fact that Ada developers do not frequently use debuggers?). For C developers, debuggers are not even enough; they have to resort to additional tools (at greater expenses both in terms of cost and computing resources). For instance, look at the following excerpt from a product review that appeared in IEEE Computer in the November issue (Pp 66-68): "Whether you're an experienced C-language programmer or a freshman in engineering, you've probably spent hour sitting in front of some computer terminal trying to detect the elusive bug... xyz developed a software tool to help you ... it detects a large class of programming errors and runtime errors ... and it inserts test and analysis functions into it [your program] ... During runtime it checks data values and memory references..." The vendor claims that "it can catch the bugs caused by the following problems and errors: . memory corruption caused by reading or writing beyond the valid areas . operations on uninitialized, null, or "wild" pointers . memory leaks . errors in allocating and freeing dynamic memory . string-manipulation errors . operations on pointers to unrelated data blocks . incompatible variables declarations . mismatched variable types in printf and scanf argument lists . mismatched arguments types or function declarations . out-of-range, or otherwise invalid, arguments in library calls . errors returned by library calls. " The tool, of course, does these things at a price (there is no free lunch) "increases the compiled object code (for example from 91 Kbytes of plain C to 309 Kbytes when compiled with the tool). The compiling and linking takes three to four times longer. Program run six to eight times slower. The $995 price is reasonable for what it provides" The fact that they need to build such a tool for C is a clear indication of the low quality of the language. What the C community does not see is that they get all this checking with Ada EVEN AT A LOWER PRICE!!! (I purposely gave the list above as a small indication of what Ada can do for you) Why should we use a language such as C to teach introductory programming? What purpose does it serve other than torturing the students? Learn how to debug? - so much for productivity. Be a macho programmer? I'm lost. We should give our students the right tools to build correct and reliable systems, a goal that is much more difficult to achieve after the fact. It is not what the language allows you to do, but what it prevents you from doing, and in this case Ada is a winner in preventing many of the most common errors listed above by detecting anomalies at compile time and treating others with additional run-time checking and exception handling facilities. jorge --..--