From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 18 Dec 92 18:11:58 GMT From: agate!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!csc.ti.com!til de.csc.ti.com!mksol!mccall@ucbvax.Berkeley.EDU (fred j mccall 575-3539) Subject: Re: C++ vs. Ada -- Is Ada loosing? Message-ID: <1992Dec18.181158.28683@mksol.dseg.ti.com> List-Id: In <1992Dec18.141448.13862@mcc.com> srogers@teenwolf.mcc.com (Steve Rogers) wri tes: >In article <16269@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O' Keefe) writes: >>Just recentrly, I posted an article to comp.lang.c in which I listed a >>number of errors in a textbook. The textbook is about data structures >>in C. The authors understand data structures very well. . . . . > >>I believe that Ada is a bigger language than C. Both languages have "dark >>corners". But there seems to be a tradition of Ada compilers being picky >>and C compilers letting it all hang out. With all due respect to "The >>Emperor's New Clothes", which I loved when it came out, I am now _more_ >>frightened about critical software being written in C or C++ than in Ada. >> >>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? >> >I'm not sure this is true; the Barnes Ada book has LOTS of examples that >violate the LRM. I think perhaps it's more of a way of teaching than >a symptom of the particular language. In my CS education, many instructors >(and books) adopted a method of presenting a narrow version of the language >as though it were the whole truth, then expanding it in steps with each >new lesson; perhaps under the theory that this would make it easier to >grasp the wider concepts. This is why I don't approve of Ada as a first language. The language is simply too large and powerful, and when you try to teach restrictive subsets you wind up teaching things that are 'wrong' in the broader scope. C++ has this same problem, along with a problem that it 'inherits' from C. The biggest problem with C isn't the size of the language (it's actually fairly small), but that so much of the power and expressiveness of the language relies on things that beginning students typically have a great deal of trouble with; pointers and recursion. When you add the somewhat arcane syntax required for declaring complex types and all the safety of an unshielded buzz saw, C is an even worse choice for a first language than Ada is. I think students would be best served by using something INTENDED for teaching, which is relatively safe and small. That pretty much means Pascal. Some schools have had good luck with LISP/SCHEME style languages, but I'm not sure how easy they are to deal with as first languages, either. -- "Insisting on perfect safety is for people who don't have the balls to live in the real world." -- Mary Shafer, NASA Ames Dryden ------------------------------------------------------------------------------ Fred.McCall@dseg.ti.com - I don't speak for others and they don't speak for me.