From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,8be18979db11f51c X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,fb631c9316319fef X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 2001-02-28 09:08:05 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.maxwell.syr.edu!news-out.uswest.net!diablo.cs.uofs.edu!info.cs.scranton.edu!triangle.cs.uofs.edu!bill From: bill@triangle.cs.uofs.edu (Bill Gunshannon) Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: Drop C/C++ better sooner than later Date: 28 Feb 2001 16:55:28 GMT Organization: University of Scranton Distribution: world Message-ID: <97jai0$klq$1@info.cs.uofs.edu> References: <97egck$vc6$3@info.cs.uofs.edu> <3A9AEFCD.AFC8431@infopuls.com> <97etsu$j41$1@pyrite.mv.net> <3A9B023A.CBD414A5@infopuls.com> <3A9C2B88.8032D829@infopuls.com> <97j1jq$g00$1@info.cs.uofs.edu> Reply-To: bill@cs.scranton.edu NNTP-Posting-Host: triangle.cs.uofs.edu X-Trace: info.cs.uofs.edu 983379328 21178 134.198.172.101 (28 Feb 2001 16:55:28 GMT) X-Complaints-To: news@cs.uofs.edu NNTP-Posting-Date: 28 Feb 2001 16:55:28 GMT X-Newsreader: xrn 9.01 Xref: supernews.google.com comp.os.vms:20540 comp.sys.dec:2919 In article , rdeininger@mindspring.com (Robert Deininger) writes: |> |> |> Sounds like a bit of Ada advocacy. :-) Sorry, you won't find much of that from me. :-) I don't particularly like the language and I've been involved with peripherally since before the first validated compiler. |> |> In no way did Dyjkstra convince everybody. Tongue must have been too firmly planted in cheek on the above. Dijkstra never convinced me. |> |> There are times when GOTO is just what's needed. The example I see most |> often is coding a state machine. For an eloquent defense of GOTO, look in |> the comp.lang.ada archives for Robert Dewer's posts on the topic. This surprises me. If Dewer is who I think he is, he was one of Ada's strongest advocates and GOTO is very much contrary to the paradigm put forward by it's developers. |> |> Using ":=" for assignment had quite a lot of precident at the time C was |> developed. Starting a new convention was unnecessary. Way too late to |> change it now. Really?? With C and Pascal being pretty much parallel developments (both starting around 1971 somewhere) I assume oyu must mean something earlier. Of course, it could have been worse. PL/1 used the same symbol "=" for both assignment and comparison. Maybe you mean Algol? But the use there wasn't particularly clear or unambiguous, if I remember correctly. |> |> Though you have supported the use of Ada in a classroom, Where did I say I supported it's use inthe classroom?? My preference for a first programming language remains Pascal. After all, that was the intended use of it's creator. We're back to that "the right tool for the job" idea again. |> you're convincing |> me you hardly know it yourself. While I have not done any million line projects with it, I know it well enough to program in it when required. And to help debug others Ada code. |> Ada was IN NO WAY intended to fit all |> problem spaces. Two of the big design demands were for embedded |> programming, and for a language that scales well to very large programs. Well, I was in data processing in the Military when it was first being developed and we were being told that all DOD systems would have to be eventually, rewritten in Ada. Luckily, that never happened. DOD had every intention of impossing Ada on everyone under their domain. How else do you think they justified the millions (billions?) of dollars wasted on the project?? |> |> Your remarks about "bloated monster" and "not practical for small |> machines" are nonsense. A number of languages are significantly bigger |> than Ada. And it has been implemented on a number of small systems. Some |> of the first compilers _were_ dogs, however. I guess your concept of a "small system" differs from mine. The smallest system I have ever seen a validated Ada compiler (and remember, there are no subsets of Ada!!) on was a VAX. At the time I saw my first Ada compiler I was doing a lot of work on PDP-11's, Z80 and M68000 microcomputers and even a Univac 1100. I know there was never an Ada compiler for the first three and I never saw one for the Univac. |> |> Ada _is_ a lot bigger than C, but it does much more. Actually, it does exactly the same thing. It just does it differnt. One of the most common ada compilers is GNAT which is just a different parser front end on a C compiler. I guess the biggest question is, "Does the language provide enough advantage to warrant the extra resources it requires?" Some of us say no. |> From the |> programmer's point of view, you don't have to learn parts you don't need. Which is true of any language. |> There is a fairly concise C-like subset (with somewhat fuzzy boundaries) No, according to the proponent agency, there are no subsets. |> for example. Of course the compiler implementor has to deal with the |> whole language. Ada is also more specific than C -- the implementor has |> much less discretion in how a feature must behave. Not true, and this is one of my main complaints. Look up tasking. It is totally implementor dependant. Two "parallel" tasks need not run in parallel and may in fact run asynchronously under some implementations. Which enters into a whole other argument about wether or not tasking belongs in a language at all, as opposed to being a function of the OS. |> |> I don't think this is quite the right description of Ada. It is designed |> to let the compiler catch a lot of mistakes, so they never get into the |> running program. This may have a side effect of making programmers a bit |> more careful, thus reducing mistakes. Experience has shown that it has quite the opposite effect. Why desk check your code when you can rely on the compiler to do it for you. The result is sloppier code that is syntactically correct but with some rather unique logic errors. |> > Now I'm confused. What you say above is in complete agreement with what |> > I have said, as well. Especially in the case of Ada. |> |> Well, he can't even spell Ada, so maybe his complaints are second hand? :-) |> |> The backdoors in Ada aren't obsure or hard to understand. There was an |> effort to make use of backdoors (unchecked deallocation, unchecked |> conversion ...) very explicit and obvious to the reader. And you don't |> need such things very often in Ada. Most programs never see them. I |> think they are most often abused by people trying to write C code using |> Ada syntax. That does lead to horrible code in a hurry. |> |> It's also not fair to say that more "backdoors" keep getting added to |> Ada. It has been quite static in this regard. |> This was true of C as well until ANSI got their hands on it. |> Some of the complaints above apply much more to Pascal than to Ada. |> Pascal really was too constrained for many purposes, and had some subtle |> back doors. Yes, this is a prime example of using the wrong tool for the job. Pascal was created to "teach" algorithms and data structures. Not to implement them in the real world. It is, of course, interesting to note that after seeing this terrible misuse of the language, wirth went back and created a language specifically to put the ideas he had put forward in Pascal in a practical and usable form. And thus was Modula born. And we all know how popular this language became. (he says with tongue planted very firmly in cheek!) :-) |> Ada is a descendant of Pascal, but it extends Pascal for |> useability, and closes some backdoors. This is one of the biggest things in Ada's favor. (IMHO) Not only did it keep a lot of this Pascal flavor, it had input from and was developed by many people who were firmly planted in earlier Pascal development. |> > This I don't agree with. In most cases, the actual coding is the smallest |> > part of the project. (at least well designed projects) |> |> Agreed. I'm glad of this. One of the things I constantly lament around here is how little pre-coding thought goes into most student work and the fact that this is not seen as a problem worth addressing. |> |> > It takes no longer |> > for an experienced C programmer to code a task in C than it would take an |> > experienced Ada programmer to do it in Ada. And believe it or not, regardless |> > of the language used, programmers of the same level of experience will make |> > an equivalent number of mistakes. It isn't the language that makes the |> > mistakes. |> |> If you spend time reading the Ada literature (or Eiffel, probably others), |> you will find that this has been measured, and refuted. C really is more |> error prone. Briefly, you are probably right about speed of initial |> coding. But not about error rates. I would dispute this, but as you state in the next line, I think it is more of a language war thing. Trust me on this one thing. In working with students, I see really bad programs written in Pascal, Ada, C, C++. Visual Basic and now even Java. |> |> Don't really want to start a language war. I hope it's not too late. No war intended. While I do most of my work in C (as I work primarily on Unix Machines and C is very much at home there.) I can do program in more than a dozen other languages. I believe in the right language for the job and that 90% of the project preceeds even the choice of language. The question is, how do you convince enough people to translate this into practice. All the best. bill -- Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves bill@cs.scranton.edu | and a sheep voting on what's for dinner. University of Scranton | Scranton, Pennsylvania | #include