From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Ada vs C++ vs Java Date: 1999/02/08 Message-ID: #1/1 X-Deja-AN: 441995374 References: <369C1F31.AE5AF7EF@concentric.net> <369DDDC3.FDE09999@sea.ericsson.se> <369e309a.32671759@news.demon.co.uk> <77ledn$eu7$1@remarQ.com> <77pnqc$cgi$1@newnews.global.net.uk> <8p64spq5lo5.fsf@Eng.Sun.COM> <77t3ld$nou$1@nnrp1.dejanews.com> <79ce4s$lfq$1@nnrp1.dejanews.com> <79chc7$ko6@drn.newsguy.com> <79mn6h$bls@drn.newsguy.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 918494653 16688 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-08T00:00:00+00:00 List-Id: On 8 Feb 1999, mike wrote: > I guess what I meant to say is that to express something in Ada requires > too many words. At least more than in C++. specially for the more advanced > constructs. > > I find that it is easier to read and understand anything when things > are shorter, requiring less words, and more terse. > > ... snip ... > > This is what I mean. I dont think langauges with more bigger words makes them > easier to read as the claim always be made for Ada. Then you should really like APL, J, K, and similar languages, which aim for maximal code compression. I can also write your example in Perl or Icon, and it will also be shorter than the C++. > >> C++ now, after becoming a standard, and with the standard library is a > >> very safe language. > > > > >No, sorry, Tucker Taft had it right. With hard work, you can make write > >relatively safe C++, but the defaults are all unsafe. With a bit of > >effort, you can write unsafe Ada, but the defaults are safe. I prefer the > >Ada way. > > > > Yes, I understand this. But Tucker and youself agree that using the standard > C++ library makes C++ applications safe( safer?). I can't speak for Tucker, but I don't agree. You'd have to add many qualifications to that sentence first. > >I think what many Ada proponents missed in this post was that this example > >demonstrates how automatic instantiation can lead to short and *readable* > >code sections. > > > > So far, no one has been able to come up with an Ada example to do the > same as below using the only STANDARD Ada library and even with twice as > much code as shown below. You can't write an Ada tasking program in the STANDARD C++ library at all. I have my own set of component libraries which enable me to write Ada code only slightly longer than what you wrote. Others also have their own components. It will be a while before Ada has a standard component library, but there will be "de-facto" standards soon. > The famouse Robert Dewar complained that this > is a silly example. He was correct in reading your mind and guessing what you meant. It is a really silly example, if you're just complaining about the lack of a standard collection library. I thought you were commenting on how C++ automatic instantiation resulted in more readable code (projection I suppose :-), in which case it wouldn't have been so silly. > But where is the Ada example to do the same? If you let me use my own libraries, or someone else's, it won't be too much longer than the C++, certainly not pages of code. -- Brian