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 07:00:08 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!user-2ive673.dialup.mindspring.com!user From: rdeininger@mindspring.com (Robert Deininger) Newsgroups: comp.os.vms,comp.sys.dec Subject: Re: Drop C/C++ better sooner than later Date: Wed, 28 Feb 2001 09:58:09 -0500 Organization: MindSpring Enterprises Distribution: world Message-ID: References: <97cd06$hcn$1@pyrite.mv.net> <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> NNTP-Posting-Host: a5.f7.18.e3 X-Server-Date: 28 Feb 2001 14:56:31 GMT Xref: supernews.google.com comp.os.vms:20512 comp.sys.dec:2909 In article <97j1jq$g00$1@info.cs.uofs.edu>, bill@cs.scranton.edu wrote: > In article , > "Rick Cadruvi" writes: > Even as far back as Fortran I learned as a programmer that implicit > anything was a bad idea. Never assume, always code explicitly. Sounds like a bit of Ada advocacy. :-) > |> > |> 3. BREAK. Break should be allowed from ALL Begin/End ({}) > |> constructs (including IF ELSE). You should also be able to > |> BREAK # where # is the number of Begin/End blocks you want > |> to break out of. > > Sounds like you want GOTO back. I thought Dyjkstra convinced everyone > that was a bad idea?? ;-) In no way did Dyjkstra convince everybody. 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. > Well, you need two symbols for "equals", comparison and assignment. > That is what the "=" means. Anything else would be non-intuitve. > Question: What does ":" have to do with equality?? And yes, when > we used to use Pascal as our beginning language here one of the most > common coding errors was leaving out those pesky ":". Using double > "=" for comparison is very intuitve when you consider that every > other comparison that involves equality consists of a digraph with > at least one "=". (ie. ">=", "<=", "!=") 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. > |> > |> My ideal language would probably be mostly a combination of BLISS and C. > > There is no such thing as "the ideal language". Ada was an attempt to > create (by committee no less!) a language that could be used for everything. > The result is a bloated monster that requires so much in resources that > it was never practical for small machines (and even some large ones like > PDP-11's). Most languages were created to fill a discovered need at the > time of their creation. Though you have supported the use of Ada in a classroom, you're convincing me you hardly know it yourself. 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. 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. Ada _is_ a lot bigger than C, but it does much more. From the programmer's point of view, you don't have to learn parts you don't need. There is a fairly concise C-like subset (with somewhat fuzzy boundaries) 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. > |> > |> One thing I don't want is a language to get in the way. A lot of newer > |> languages are > |> designed to prevent programmers for doing things to keep them from making > |> mistakes. > |> I understand this logic, but what you have is an effort to over compensate > |> because > |> programmers were never taught to program well and they write BAD code. 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. > |> In order for a language to be useable, they invariably provide some > |> "backdoor" > |> that allows you to do the things you really want to do. As a result, those > |> "backdoors" get abused. Along comes someone else who says they have to > |> do something new that removes that "backdoor". As more code is written in > |> the > |> new language, it becomes clear that new "backdoors" have to be implemented > |> because the language is preventing complex things from being done or at > |> least > |> is making them so difficult that they take too long. This was always my > |> problem > |> with ADA. > > 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. 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. Ada is a descendant of Pascal, but it extends Pascal for useability, and closes some backdoors. > > |> Time to implement a project is VERY important. It's one of the > |> BAD > |> things with C/C++ in terms of applications 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. > 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. Don't really want to start a language war. I hope it's not too late. -- Robert Deininger rdeininger@mindspring.com