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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,dbbbb21ed7f581b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!newsfeed.straub-nv.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Operation can be dispatching in only one type Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <025105f2-5571-400e-a66f-ef1c3dc9ef32@g27g2000yqn.googlegroups.com> <94e76749-c49c-45aa-b7dc-386da0d71c66@e4g2000prn.googlegroups.com> <1u0im1tdws15u.1n9v9rz7bu4t4$.dlg@40tude.net> Date: Mon, 16 Nov 2009 21:32:46 +0100 Message-ID: NNTP-Posting-Date: 16 Nov 2009 21:32:45 CET NNTP-Posting-Host: 9c77f6af.newsspool4.arcor-online.net X-Trace: DXC=WmB?;BoiC[MFJ3]dH>I?oE4IUK On Mon, 16 Nov 2009 21:28:00 +0100, Dmitry A. Kazakov wrote: > At the same time the case represented by "diagonal" dispatch is very > important in other situations, like parallel hierarchies of types. E.g. > when we wanted to force a new instance from B'Class for each new instance > from A'Class. But again that enforcement shall be static. BTW, it is not > multiple dispatch. Technically this is rather single dispatch where the > tuple of types (A, B) is considered as root of some class of tuples, in > which (A1, B1), (A2, B2) are instances. Presently we have nothing in the > language to handle this (except the jack-of-all-trades, generics). It would > be interesting to speculate how tuples can be supported in Ada, especially > their flattening in the arguments lists, and using tuples as multiple > results of a function. I forgot to say, that in this case illegal combinations like A1, B2 are statically illegal, because there would be no tuple (A1, B2) declared. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de