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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,961b968d014d8843 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-25 00:24:58 PST Path: pad-thai.cam.ov.com!bloom-beacon.mit.edu!gatech!swrinde!pipex!sunic!news.uni-c.dk!nbivax.nbi.dk!meyer.fys.ku.dk!sparre Newsgroups: comp.lang.ada Subject: Re: Ada Objects Help! Message-ID: <1995Jan24.230910.2241@nbivax.nbi.dk> From: sparre@meyer.fys.ku.dk (Jacob Sparre Andersen) Date: 24 Jan 95 23:09:09 +0100 References: <3f9g1u$j4m@nps.navy.mil> <1995Jan16.132400@lglsun.epfl.ch> <131279@cup.portal.com> <3fopnh$9k1@gnat.cs.nyu.edu> Nntp-Posting-Host: meyer.fys.ku.dk X-Newsreader: TIN [version 1.2 PL2]Lines: 34 Date: 1995-01-24T23:09:09+01:00 List-Id: Tucker Taft (stt@henning.camb.inmet.com) wrote: |^^^^^^^^^^ | As Robert is implying, object-oriented languages differ in both significant | and insignificant ways. Clearly you need to identify the object which | is the "target" when invoking an operation. In C++ and Smalltalk, this object | is identified in a "prefix" of the invocation of the operation. In | Ada 95 and CLOS (Common Lisp Object System), this object is identified | as one of the parameters of the invocation of the operation. | | It turns out that the Ada 95/CLOS approach is somewhat more powerful, | in that you can syntactically transform the C++/Smalltalk "prefix" | notation into the Ada 95/CLOS "parameter" notation, but not necessarily | vice-versa. Both Ada 95 and CLOS allow multiple "objects" controlling | the dispatch, making binary operations simpler and more symmetrical. | Ada 95 is unique in allowing the result context to control the run-time | dispatch. CLOS is more general in that a best-fit pattern match is performed | at run-time to decide which implementation to invoke (roughly analogous | to the best-fit compile-time overload resolution algorithm that | C++ performs), while Ada 95 requires a "perfect" match (allowing a simple | single-level-of-indirection to perform the dispatch). ^^^^^^^^^^ I am pretty sure I know how Borland Pascal and C++ decides which virtual method to call, but as I've understood Ada95, the decision could be based on more than one object. Am I right? And how is it done? Regards, Jacob Sparre Andersen -- A good movie? - What about three? - Kieslowskis 'White', 'Blue' and 'Red'! -- URL's: "mailto:sparre@nbi.dk", "http://meyer.fys.ku.dk/~sparre", "mailto:sparre+@pitt.edu" & "http://www.pitt.edu/~sparre". -- "We need a plan to diverge from", Fesser