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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada wikibook help needed (O-O) Date: Sun, 23 Apr 2017 12:52:10 +0200 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: BYuA7L7MRjuLLjcoGHOBxw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:46612 Date: 2017-04-23T12:52:10+02:00 List-Id: 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