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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-08 15:23:50 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!ash.uu.net!spool.news.uu.net!not-for-mail Date: Mon, 08 Dec 2003 18:23:34 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada References: <5JmdnUF_9o_ABE-iRTvUrg@rapidnet.com> <1273941.m4G3ZzughP@linux1.krischik.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1070925814.814267@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@nightcrawler.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1070925814 2147 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:3247 Date: 2003-12-08T18:23:34-05:00 List-Id: Chad Bremmon wrote: > A class has a parameter associated with it that is always passed to > every function of that class. You can't see it. It's a compiler thing, > but it's there. Rather, ordinary member functions are implemented with a hidden parameter which is a pointer to the class object, and which becomes the "this" pointer inside the function. Ada passes the class object explicitly as a non-hidden parameter. The effect is precisely the same. > Yes it can, because if there is supposed to be inheritance, then there > is a tagged type, which you can inherit from. I've explained to you how > difficult it is to create a virtual dispatch at runtime. And I've explained to you that it's the same as in C++, only in C++ taggedness is implicit rather than explicit. > The reason I know what I'm talking about is because I have written > programs that interface Ada95 and C++, and I know what's happening under > the covers. If you would like to take some time to disassemble some C++ > code and understand what YOU are talking about, feel free. Until then, > I'm going to stop arguing with you. You, my friend, are the one who > doesn't know what you're talking about. I dare say I understand C++ better than some 99.9% of people who claim to know it (and no, I don't think I'm exaggerating). I think you're very confused. I would suggest that a good book on C++ would further your understanding more than disassembling code. I do recall from old discussions with DK that in Ada you are more likely to get into situations where you will not redispatch after having dispatched once, whereas in C++ you will, but I wouldn't consider that an advantage of Ada.