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,b87849933931bc93 X-Google-Attributes: gid103376,public From: dgibson@snoopy.cis.ohio-state.edu (david scott gibson) Subject: Re: Multiple Type Interfaces Date: 1997/01/29 Message-ID: <5cnl86INNam9@snoopy.cis.ohio-state.edu>#1/1 X-Deja-AN: 212984924 references: <32EE6EF2.2487@watson.ibm.com> <5cm4raINN6ru@snoopy.cis.ohio-state.edu> organization: The Ohio State University, Department of Computer and Information Science newsgroups: comp.lang.ada Date: 1997-01-29T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: >Yes, but if you have an operation that takes T2'Class in the same package >as the declaration of type T2, then what you're saying is that that >operation is non-primitive, and you specifically *don't* want it to be >inherited by types that derive from T2. Right, but I *do* want it to be "primitive" in the sense that it would be included in the interface of package extensions. I *don't* want it to be a primitive operation associated with only the single controlling operand type (as Ada95 requires). Declaring an operand at T2'Class was just a suggestion to try getting around the rule prohibiting multiple controlling operands. >I wouldn't bother trying to make the operation directly visible to clients >of the child package - let clients get it from the parent package, where >it's declared - but if you insist, then you could simply rename it in the >child (I think). If adding new T2 operations in the extension package required declaring a new type derived from T2 (perhaps implicitly), then the operation would probably have to be "inherited" in some sense so that it would be available for calls with operands of types T1 and the new type derived from T2. Also, T1, T2, and the operation with T1 and T2 as operands might all be abstract in the parent unit and concrete in the child unit. In this case, I'd like both operations available to the client. Dave -- dgibson@cis.ohio-state.edu