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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public From: eachus@spectre.mitre.org (Robert I. Eachus) Subject: Re: Multiple Dispatch in Ada 95 (Was Re: Real OO) Date: 1996/04/19 Message-ID: #1/1 X-Deja-AN: 150431138 references: organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-04-19T00:00:00+00:00 List-Id: In article rogoff@sccm.Stanford.EDU (Brian Rogoff) writes: > This raises an interesting question. Why doesn't Ada 95 support > multimethods? I'm sure this was discussed somewhere, I just haven't > seen it. Does multiple dispatch break something, or was it mainly an > implementation thing? Could we see it in a future version of Ada? It is very possible to do multiple dispatch in Ada 95, and I think I even posted the idiom recently. However, you had better know what you are doing! This is not a comment on Ada 95, but on writing operations with multiple (dispatching) parameters. In Ada you define a primitive for one class with a classwide parameter of the same or another class. The advantage--and disadvantage of this is that the dispatches are not simultanous but ordered. You have to be able to define the operation in way that is partitionable, but you gain the advantage that the operation is always well defined for any set of parameters. -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...