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: 1108a1,c52c30d32b866eae X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public From: mbk@caffeine.engr.utk.edu (Matt Kennel) Subject: Re: Real OO Date: 1996/05/10 Message-ID: <4n066d$6gl@gaia.ns.utk.edu>#1/1 X-Deja-AN: 154171260 references: <4mls4h$sau@watnews1.watson.ibm.com> <4mqbls$vtc@watnews1.watson.ibm.com> followup-to: comp.lang.ada,comp.object organization: University of Tennessee, Knoxville and Oak Ridge National Laboratory reply-to: kennel@msr.epm.ornl.gov newsgroups: comp.lang.ada,comp.object Date: 1996-05-10T00:00:00+00:00 List-Id: Robert A Duff (bobduff@world.std.com) wrote: : I don't see such a big problem. An operation is class-wide if it is : class-wide in at least one parameter or result. This means that an : operation can be both class-wide and dispatching (e.g. class-wide in one : operand, dispatching on the other). : After all, if P(Integer, Some_Tagged_Type) is dispatching on : Some_Tagged_Type, we don't mind calling it a dispatching operation, even : though it is *not* dispatching on Integer. : Clearly, "class-wide operation" is a somewhat informal term (whereas : "class-wide type" is quite specific and defined in the Ada Reference : Manual). I would call a subprogram a class-wide operation if it has a : parameter of an access type that points to a class-wide type, for : example -- there's an operation that has no class-wide parameters. I know this is flame bait, but in my opinion, if you're going to have a single 'dispatching'/'controlling'/'tagged' operand you might as well bite the bullet and specifically designated it like Eiffel does. Op(a,b,tagged c) <-> c.Op(a,b) Writing things as Op(a,b,c,d,...) does seem to imply multimethods to most people. (It did to me.) After peeling away the surface Ada has more similar semantics to Eiffel than admitted---yes there really is such a thing as a 'class(Eiffel-usage) interface' of a certain type, even though "theoretically" interfaces are just properties of packages which don't have anything to do with types. : - Bob