From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada wikibook help needed (O-O)
Date: Sun, 23 Apr 2017 12:52:10 +0200
Date: 2017-04-23T12:52:10+02:00 [thread overview]
Message-ID: <odi10p$ojq$1@gioia.aioe.org> (raw)
In-Reply-To: odhv2v$9vi$1@dont-email.me
On 2017-04-23 12:22, G.B. wrote:
> The page goes to some length to explain static dispatching
> vs. dynamic dispatching, but fails to introduce "dispatching"
> first, as a term, or to reference some suitable definition.
It does in the section "Polymorphism, class-wide programming and dynamic
dispatching". Dispatching is a mechanism of polymorphic call
implementation for the case of dynamic polymorphism.
> Then,
>
> "A conversion to the class-wide type makes [components] visible again."
>
> Is "visible" correct?
Why not? The text IMO just explains specific implementation of
class-wide objects in Ada. That is, the same representation of
class-wide and specific objects.
> Is it correct to say “static call” at all,
Why not? A statically bound call.
> The idea being that “static call” is not really defined in Ada AFAICT,
> other than to mean a call of a static function in a static expression.
> So, not the same thing as discussing O-O, or static binding,
> or dynamic dispatch.
>
> "In other OO languages, a method is either dispatching or not.
The first sentence is wrong. A non-dispatching operation is not a
method. In OO nomenclature that is called "free" operation. So, all
operations are subdivided into methods and free operations. In Ada
methods are called primitive operation (in some arguments/result). There
rest is free operations.
> In Ada, a routine is either _available_ for dispatching or not. "
The second sentence is meaningless to me. There is no difference between
Ada and other languages in that respect.
Maybe the writer meant the difference that some languages like C++ are
inconsistent in the sense that the same name may mean polymorphic
(dispatching) or non-polymorphic (specific) call depending on the
context. In Ada it is unambiguous.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2017-04-23 10:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-23 10:22 Ada wikibook help needed (O-O) G.B.
2017-04-23 10:52 ` Dmitry A. Kazakov [this message]
2017-04-23 16:09 ` G.B.
2017-04-23 17:03 ` Dmitry A. Kazakov
2017-04-24 5:13 ` G.B.
2017-04-24 7:55 ` Dmitry A. Kazakov
2017-04-24 12:34 ` Jacob Sparre Andersen
2017-04-24 22:06 ` Randy Brukardt
2017-04-24 22:03 ` Randy Brukardt
2017-06-30 13:54 ` Norman Worth
2017-06-30 15:34 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox