comp.lang.ada
 help / color / mirror / Atom feed
From: "Peter C. Chapin" <pcc482719@gmail.com>
Subject: Re: What makes a procedure call 'dispatching' in Ada?
Date: 21 Nov 2009 14:07:12 GMT
Date: 2009-11-21T14:07:12+00:00	[thread overview]
Message-ID: <Xns9CCA5CC35728Fpcc482719gmailcom@198.186.192.137> (raw)
In-Reply-To: he67b2$h79$1@nntp.ilk.net

Markus Schoepflin <nospam@no.spam> 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




  parent reply	other threads:[~2009-11-21 14:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20 13:15 What makes a procedure call 'dispatching' in Ada? Markus Schoepflin
2009-11-20  9:31 ` stefan-lucks
2009-11-20 14:10   ` Niklas Holsti
2009-11-20 13:27 ` Dmitry A. Kazakov
2009-11-20 13:43   ` Markus Schoepflin
2009-11-20 13:54     ` RasikaSrinivasan@gmail.com
2009-11-20 13:58     ` Markus Schoepflin
2009-11-20 14:19       ` Niklas Holsti
2009-11-21 14:07       ` Peter C. Chapin [this message]
2009-11-20 14:00     ` Niklas Holsti
2009-11-20 14:10     ` Dmitry A. Kazakov
2009-11-20 13:56 ` Niklas Holsti
2009-11-20 14:31   ` Dmitry A. Kazakov
2009-11-20 15:00     ` Niklas Holsti
2009-11-20 18:44       ` Dmitry A. Kazakov
2009-11-20 20:09         ` Niklas Holsti
2009-11-20 20:59           ` Dmitry A. Kazakov
2009-11-20 14:54 ` Ludovic Brenta
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox