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: fac41,c52c30d32b866eae X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,2ea02452876a15e1 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,c52c30d32b866eae X-Google-Attributes: gid1108a1,public From: donh@syd.csa.com.au (Don Harrison) Subject: Re: Real OO (was Choice of OO primitives in Ada95) Date: 1996/03/15 Message-ID: #1/1 X-Deja-AN: 142923608 sender: news@assip.csasyd.oz references: organization: CSC Australia reply-to: donh@syd.csa.com.au newsgroups: comp.lang.ada,comp.lang.eiffel,comp.object Date: 1996-03-15T00:00:00+00:00 List-Id: In article , bobduff@world.std.com (Robert A Duff) writes: :In article , :Don Harrison wrote: :>Various arguments have been advanced to justify co-encapsulation. Below is a :>collective response. :> :>1) Co-encapsulation preserves the symmetry of operands. :> :>As indicated in a previous post, the requirements of polymorphism demand that :>operands are intrinsically asymmetric which suggests that uni-encapsulation is :>more appropriate. : :Correct when there are two tagged types involved (unless you have :multi-methods, as in CLOS). : :However, the symmetry is *not* lost when you have something like: : : procedure Union(X, Y: Set) return Set; : :In other OO languages, the parameter X is the special one, and symmetry :is lost. Not a big deal, I admit, but I find it slightly cleaner, :conceptually, to consider X and Y to be on equal footing. I agree this visually more symmetrical. Of course, the operation still semantically belongs to tagged type Set - it is a primitive operation of it. : :- Bob : Don.