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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,703c4f68db81387d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsread.com!newsprint.newsread.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!newscon06.news.prodigy.com!prodigy.net!newsmst01a.news.prodigy.com!prodigy.com!postmaster.news.prodigy.com!newssvr13.news.prodigy.com.POSTED!4988f22a!not-for-mail From: Newsgroups: comp.lang.ada References: <4229bad9$0$1019$afc38c87@news.optusnet.com.au> <1110032222.447846.167060@g14g2000cwa.googlegroups.com> <871xau9nlh.fsf@insalien.org> <3SjWd.103128$Vf.3969241@news000.worldonline.dk> <87r7iu85lf.fsf@insalien.org> <1110052142.832650@athnrd02> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <1111607633.301232.62490@z14g2000cwz.googlegroups.com> <4793664.vi5Yol0h1t@linux1.krischik.com> <1111719129.745924@athnrd02> Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Message-ID: NNTP-Posting-Host: 64.164.117.46 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr13.news.prodigy.com 1111773961 ST000 64.164.117.46 (Fri, 25 Mar 2005 13:06:01 EST) NNTP-Posting-Date: Fri, 25 Mar 2005 13:06:01 EST Organization: SBC http://yahoo.sbc.com X-UserInfo1: TSU[@SBEQJV]SQ@[EZOD]_\@VR]^@B@MCPWZKB]MPXHTEPIB_NVUAH_[BL[\IRKIANGGJBFNJF_DOLSCENSY^U@FRFUEXR@KFXYDBPWBCDQJA@X_DCBHXR[C@\EOKCJLED_SZ@RMWYXYWE_P@\\GOIW^@SYFFSWHFIXMADO@^[ADPRPETLBJ]RDGENSKQQZN Date: Fri, 25 Mar 2005 18:06:01 GMT Xref: g2news1.google.com comp.lang.ada:9990 Date: 2005-03-25T18:06:01+00:00 List-Id: "Ioannis Vranos" wrote in message news:1111719129.745924@athnrd02... > > In C++, multithreading is platform-specific. I think this is better than > Ada, but may be I am just used to it. > Better is a relative assessment, in this case. When concurrency is a part of the programming language, the language is simpler. If Ada did not have concurrency, many other things in the language would be much easier. The addition of concurrency, as part of the language definition, does place some restrictions on some features that some designers might find less restrictive in other languages. On the other hand, Ada's expressive power includes the ability to write concurrent program units that are checked for consistency by the compiler. An important idea in Ada concurrency is that the tasks (Ada's primary unit for concurrency) are as type safe as the rest of the program. They are also portable across many different platforms. The ability to write type-safe, portable concurrent software has proven its value in many projects. There are always tradeoffs. When we compare any set of languages, feature by feature, we have to realize that someone can easily highlight some set of features in one that is present or absent in some form or other. Further, some of us will find a feature of a language ugly, difficult, or ask "Why would I even want to do that?" when others will revel in their good their good fortune as having such a feature available. The example of C++ templates versus Ada generics has been cited. I understand the very interesting instantiation model of C++. In fact, I had to explain it to a colleague about a year ago who was stymied by its seemingly obfuscating nature in a program he was trying to read. And, I am not one of those who is particularly enamoured of it. Ada generics, with the exception of generic formal package parameters, are wonderfully easy to understand, and have consistenly provided a good model for writing easy to understand code. On the other hand, with generic formal package parameters, a more difficult concept (but one I have tried to clarify in my Ada Letters article several years ago), we can accomplish things that can be done with C++ templates, and some of those things a little better. In this thread, we have discussed C++ templates as a way to do the equivalent of Ada's range definitions; posted code to prove that Ada is better than C++ or that C++ is better than Ada; lamented that language A does not have the features of language B; argued that language A does not really need the features of language B; and retaliated to ad hominen attacks by lobbing code grenades across the entire set of comp.?.? Newsgroups. By now it should be clear that some of us prefer Ada for some kinds of programming. Some of us who also use C++ understand that we have to live with it, and that it can be useful for certain classes of programming. Those who prefer C++ are unlikely to ever succumb to the charms of Ada. It is reminiscent of the old saw "He convinced against his will, is of the same opinion still." So is there a common ground for the two sides? I suppose we could agreee that neither language is ideal. There are features I would like to see in Ada. There are things I would like to have in C++. Java is not an option, not for the kind of programming I do. Eiffel comes pretty close to being a good option. I prefer it to C++, but still lean toward Ada, at present. At present there is no way for anyone to win this debate, certainly not as long as we restrict the conversation to a comparison between two imperfect languages. Then again, I defy anyone to introduce a third language into the debate that is not imperfect. I don't don't think there is one. Dr. Richard Hamming, a pioneer in computer science I once had the honor of knowing, once said of our profession, "We stand on the toes of giants." It is strange that any of us have the audacity to proclaim that our preferred language deserved such reverence when we all know that they all fall short of what we really need to build the kind of software necessary for the coming century. Richard Riehle