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-Thread: 109fba,703c4f68db81387d X-Google-Thread: 115aec,703c4f68db81387d X-Google-Thread: f43e6,703c4f68db81387d X-Google-Attributes: gid103376,gid109fba,gid115aec,gidf43e6,public X-Google-Language: ENGLISH,CP1252 Path: g2news1.google.com!news1.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!feed.news.tiscali.de!news.belwue.de!news.tu-darmstadt.de!tsicnews.teliasonera.com!news.otenet.gr!news.grnet.gr!newsfd02.forthnet.gr!not-for-mail From: Ioannis Vranos Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: Fri, 11 Mar 2005 09:07:10 +0200 Organization: FORTHnet S.A., Atthidon 4, GR-17671 Kalithea, Greece, Tel: +30 2109559000, Fax: +30 2109559333, url: http://www.forthnet.gr Message-ID: <1110524844.440009@athnrd02> 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> <1110508346.652721.170680@g14g2000cwa.googlegroups.com> <1110514017.501621@athnrd02> <1110516828.659184.229280@f14g2000cwb.googlegroups.com> NNTP-Posting-Host: athnrd02.forthnet.gr Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Trace: athprx02.forthnet.gr 1110524844 25275 193.92.150.73 (11 Mar 2005 07:07:24 GMT) X-Complaints-To: abuse@forthnet.gr NNTP-Posting-Date: Fri, 11 Mar 2005 07:07:24 +0000 (UTC) User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en In-Reply-To: <1110516828.659184.229280@f14g2000cwb.googlegroups.com> Cache-Post-Path: newsfd02!unknown@ppp16-adsl-170.ath.forthnet.gr Xref: g2news1.google.com comp.lang.ada:9102 comp.lang.c++:45077 comp.realtime:1246 comp.software-eng:4814 Date: 2005-03-11T09:07:10+02:00 List-Id: fabio de francesco wrote: > Thank you for your reply and for introducing me to "stdexcept" and > "std::out_of_range". I didn't know those features so I want to learn > some more about them. There are a lot of great things to learn in C++, if you have TC++PL 3, take a look at chapter 19 for example (myself have "paused" in the beginning of chapter 19 since more than a year ago, so as to learn some .NET-specific programming). > B.Stroustrup wrote in his "C++ Programming Language" that He was partly > inspired by Ada (and by a misterious to me "Clu") in creating C++ > templates and exceptions. Does it mean these languages are closer than > everyone would expect? One thing is sure, in this discussion thread with Ada programmers, I "feel like home", and Ada people provide examples based on facts. I had not thought to look in TC++PL for Ada, but indeed it looks like there are some references: "A programmer coming from a different language (say C, Fortran, Smalltalk, Lisp, ML, Ada, Eiffel, Pascal, or Modula2) should realize that to gain the benefits of C++, they must spend time learning and internalizing programming styles and techniques suitable to C++. The same applies to programmers used to an earlier and less expressive version of C++." "Templates were partly inspired by Ada�s generics (both their strengths and their weaknesses) and partly by Clu�s parameterized modules. Similarly, the C++ exception-handling mechanism was inspired partly by Ada [Ichbiah,1979], Clu [Liskov,1979], and ML [Wikstr� m,1987]. Other developments in the 1985 to 1995 time span � such as multiple inheritance, pure virtual functions, and namespaces � were primarily generalizations driven by experience with the use of C++ rather than ideas imported from other languages." "[Ichbiah,1979] Jean D. Ichbiah, et al.: Rationale for the Design of the ADA Programming Language. SIGPLAN Notices. Vol. 14 No. 6. June 1979." "For many people trained in languages such as C, Pascal, Modula2, and Ada, there is an almost irresistible urge to organize software as a set of switch-statements. This urge should usually be resisted. Use virtual functions (2.5.5, 12.2.6) rather than RTTI to handle most cases when run-time discrimination based on type is needed." -- Ioannis Vranos http://www23.brinkster.com/noicys