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 X-Google-Thread: 1108a1,c52c30d32b866eae X-Google-Attributes: gid1108a1,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Real OO Date: 1996/05/08 Message-ID: #1/1 X-Deja-AN: 153822197 references: <4mls4h$sau@watnews1.watson.ibm.com> <4mqbls$vtc@watnews1.watson.ibm.com> organization: The World Public Access UNIX, Brookline, MA newsgroups: comp.lang.ada,comp.object Date: 1996-05-08T00:00:00+00:00 List-Id: In article <4mqbls$vtc@watnews1.watson.ibm.com>, Norman H. Cohen wrote: >This is a good observation. In the vast majority of naturally occurring >examples, the tagged formal parameters tend to be all classwide or all >specific (specific = not classwide) and we can get away with informally >referring to classwide operations, but in cases like the artificial >examples I discussed you are quite right. 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. - Bob