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,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!cyclone1.gnilink.net!gnilink.net!wns14feed!worldnet.att.net!12.120.4.37!attcg2!attws2!att542!ip.att.net!newsfeed3.global.lmco.com!svlnews.lmms.lmco.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: [OT] Re: Teaching new tricks to an old dog (C++ -->Ada) Date: Thu, 10 Mar 2005 17:39:13 -0500 Organization: Earth Message-ID: 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> <42309456$1@news.broadpark.no> NNTP-Posting-Host: 158.187.64.144 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 Xref: g2news1.google.com comp.lang.ada:9071 comp.lang.c++:45016 comp.realtime:1221 comp.software-eng:4789 Date: 2005-03-10T17:39:13-05:00 List-Id: "Ed Falis" wrote in message news:opsnfw9nx75afhvo@localhost... > On Thu, 10 Mar 2005 15:55:17 -0500, xpyttl > wrote: > > > The two camps are equally close to the truth. > > Fortunately, it mostly hasn't been that bad as language debates go ;-) > > - Ed I have been following this thread with great interest. C++ is by far my favorite language, but use Ada almost exclusively at work. I love C++, but I would not relish creating a large-scale, fault-tolerant system in it, especially involving a large team with varying levels of skill. This thread has been surprisingly civil with only one or two individuals using childish attacks and half-truth to argue their side (I won't say which). Though, I had to cringe when some in the C++ camp attempted to argue its safety vs. Ada. I would not, myself, attempt that argument. I think its a great language, and gives you a lot of flexibility that you can build safety upon, but does not inherently come that way. On the other hand, it takes effort to write an Ada program that will crash. If it compiles, it will usually run. It may not do what you intended, of course, but it won't "core dump" or cause a reboot, etc. Although I have to admit, I prefer C++'s OO model. I find it easier (personally) to see the encapsulation, and Ada's dispatching rules still confuse my. Can someone explain why they chose the package as the encapsulation level for a class? Ada features I would love to have in C++: * "new types" and sub-ranges * runtime template instantiation (I think being able to instantiate generics dynamically is the coolest thing!) * subprograms inside subprograms. I think it would be great for use with the STL (i.e., using a local function with std::foreach) * packages. namespaces are nice, but packages make modularity of very large system a lot easier. Especially now with "use type" * representation specifications!!!! C++ features I would to have in Ada: * Implicit instantiation. Yeah, I know, it can be unsafe, but that is one thing I really like about C++: the ability to automate repetitive things. * actually having a class object encapulating the data and methods. * reference (in out) types in functions (without resorting to access types) * meta-templates. very neat stuff. ugly, but neat. * The STL!!! (though I hear something similar is coming?)