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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!novia!news-out.readnews.com!postnews3.readnews.com!not-for-mail Newsgroups: comp.lang.ada Subject: Re: What makes a procedure call 'dispatching' in Ada? From: "Peter C. Chapin" References: Message-ID: User-Agent: Xnews/5.04.25 Date: 21 Nov 2009 14:07:12 GMT Organization: SoVerNet (sover.net) NNTP-Posting-Host: f297fd30.news.sover.net X-Trace: DXC=D4V>?UH<7k6XnInob9c@m9K6_LM2JZB_3MlX]Rc?:WUUlR<856?n27[JFL7P65X Markus Schoepflin wrote in news:he67b2$h79$1@nntp.ilk.net: > And one more question, can I have a dispatching procedure that doesn't > explicitly use the type it dispatches on? In C++, that would read: > > class foo > { > virtual void f() = 0; > }; > > class bar > { > void f() { > // Do something just depending on class type bar, > // not on an object of the class, so the 'this' pointer > // actually is never used. > } > }; The 'this' pointer might never be used, but it is still there anyway. Ada's approach to object oriented programming requires that you make 'this' explicit. You can, of course, choose to ignore it as well. Peter