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,2ea02452876a15e1 X-Google-Attributes: gid103376,public From: jsa@organon.com (Jon S Anthony) Subject: Re: Real OO Date: 1996/03/26 Message-ID: #1/1 X-Deja-AN: 144315040 sender: news@organon.com (news) references: <4id031$cf9@dayuc.dayton.saic.com> organization: Organon Motives, Inc. newsgroups: comp.lang.ada Date: 1996-03-26T00:00:00+00:00 List-Id: In article leschkes@ferret.cig.mot.com (Scott Leschke) writes: > How does one declare syntactically that an operation is SPECIFIC to a > type within a class, as opposed to being either a primitive of that > type or class-wide? A couple of "obvious" ways: package P is type T is tagged... -- various primitive ops... package Tspecific is -- various ops of _specific_ type T -- Not in immediate scope of package -- declaring T so not primitive either. end Tspecific; end P; or package P.Tspecific is -- various ops of _specific_ type T -- Not in immediate scope of package -- declaring T so not primitive either. end P.Tspecific; > I've also wondered if there was any way to explicitly declare an operation > as invariant within a class and hence, non-overridable. Why don't root level classwide operations work? For example: type T is tagged ... -- various derivations procedure Tinvariant (o : T'Class); -- -- Will eat anything in T'Class tree. -- Not primitive so not inheritable/overidable -- Not really overloadable either. /Jon -- Jon Anthony Organon Motives, Inc. 1 Williston Road, Suite 4 Belmont, MA 02178 617.484.3383 jsa@organon.com