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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: rogoff@sccm.Stanford.EDU (Brian Rogoff) Subject: Multiple Dispatch in Ada 95 (Was Re: Real OO) Date: 1996/04/19 Message-ID: #1/1 X-Deja-AN: 150342092 references: organization: /u/rogoff/.organization reply-to: rogoff@sccm.stanford.edu newsgroups: comp.lang.ada Date: 1996-04-19T00:00:00+00:00 List-Id: Don Harrison writes: Jon S Anthony writes: ::> In Ada, with the second, third, fourth, ... and nth :> operands of the same specific type controlling dispatching, by the :> time the compiler gets to the end of the routine signature, it is :> rolling it's eyes and crying: "Good grief, I heard you the first :> time!!!" : :Don, are you really this clueless or are you just being facetious? :The reason I say this is that the above doesn't even work as a joke, :because it is rooted in an error (instead of a clever observation). Mostly facetious. But I do find it slightly ridiculous to say that there are multiple controlling operands if it only works if they happen to have the same dynamic type. (No, I'm not saying that it should be possible for them to be different). The fact that you get an exception if the types differ is not as plain as in the Eiffel paradigm, IMO. 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? While Don clearly prefers the "Eiffel way", I think that multiple dispatch would fit in more neatly with the current Ada 95 scheme, which I like. -- Brian