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!news4.google.com!news.glorb.com!newscon02.news.prodigy.com!newscon06.news.prodigy.com!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada,comp.lang.c++,comp.realtime,comp.software-eng Subject: Re: Teaching new tricks to an old dog (C++ -->Ada) Date: 24 Mar 2005 20:10:32 -0500 Organization: The World Public Access UNIX, Brookline, MA 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> <1110284070.410136.205090@o13g2000cwo.googlegroups.com> <395uqaF5rhu2mU1@individual.net> <1111607633.301232.62490@z14g2000cwz.googlegroups.com> <1111630601.976052.35580@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1111713034 9898 192.74.137.71 (25 Mar 2005 01:10:34 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Fri, 25 Mar 2005 01:10:34 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:9940 comp.lang.c++:47143 comp.realtime:1695 comp.software-eng:5306 Date: 2005-03-24T20:10:32-05:00 List-Id: "Ed Falis" writes: > On 23 Mar 2005 18:16:42 -0800, Jerry Coffin wrote: > > >> Sorry, but if you think a class is called a tagged record in Ada, > >> you don't understand the language. > > I'll openly admit that my knowledge of Ada 95 is _extremely_ limited > > (I'm afraid I quit using Ada before 1995). Perhaps I need to take > > another look in this area. > > OTOH, doing a bit more looking, if I've misunderstood the situation, at > > least I have some company. For example: > > This is just a matter of simile. A tagged type and derivatives of > tagged types provide dispatching and other typical OOP facilities. I don't see it that way. Tagged types provide inheritance and type extension. Ada's *class* feature provides run-time polymorphism (i.e. dispatching calls). That is, you can use tagged types all you like, but you'll never get any dispatching until you say 'Class. Ada's notion of "class" (i.e. "class of types") doesn't exactly match what C++ calls "class". > Where the concept differs from the class concept is that visibility is > orthogonal, provided by packages and other more traditional Ada > facilities, while the class concept combines the two. Yeah, that, too. C++ wraps all three things into one language feature (well, sort of -- there are namespaces), whereas Ada splits them out. I was a bit taken aback by Jerry Coffin's "idiocy" remark, since I can see advantages of both ways. I somewhat prefer the Ada "splitting" way. Or maybe his "idiocy" comment was merely directed at the words: "tagged record". (Of course, it's usually "tagged private", not "tagged record".) Ada is not the only language that splits things up differently from the mainstream OOP languages. CLOS, for example, comes to mind. - Bob