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!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Redispatching Date: Fri, 18 Apr 2014 23:08:25 +0300 Organization: Tidorum Ltd Message-ID: References: <7f1c01c5-3563-4b94-9831-152dbbf2ecdc@googlegroups.com> <1cdsyxjzsfgzm.1synpaujysv21$.dlg@40tude.net> <1aa804jg9qq4o$.wdiq33yo621l.dlg@40tude.net> <1w6eh0aiksmdh$.1h16p7y0b8c6h.dlg@40tude.net> <17twpp4p8u7o$.1idvzaaio4f3t$.dlg@40tude.net> <1wjmcbk375lzk.6o7dpqcp3va3.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net AEMq2+qdf3IiE/1ZKNUiWgPnSaiJkgtQPdOQ6CoxOLtQoPDXCn Cancel-Lock: sha1:nYDFvuVWLsS1UGtsHLvfX471Su8= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:19382 Date: 2014-04-18T23:08:25+03:00 List-Id: On 14-04-17 10:26 , Dmitry A. Kazakov wrote: > On Wed, 16 Apr 2014 22:53:28 +0300, Niklas Holsti wrote: > >> On 14-04-16 12:30 , J-P. Rosen wrote: >>> As far as redispatching is concerned: since a method is linked to a >>> single class, there should be no redispatching. >> >> (I think you meant to write "linked to a single type", not "class".) >> >> Then you must also be of the opionion that there should be no >> inheritance of methods, because inheritance makes the same method become >> linked to different types. Is that your view? > > It is confused. A primitive operation (method) is defined on (linked to) > the whole class T'Class. Its specific body is defined on a specific type > S<:T. As you see it, yes. However, in Ada the parameters of type T are really views of objects which may be of type T or of a type derived from T. This must be kept in mind when coding the body, and then redispatching is merely view conversion, not type coercion. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .