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,c7ea1cb7a2beb2ee X-Google-Attributes: gid103376,public From: Robert A Duff Subject: Re: Disallowing Pre-Defined Operations Date: 2000/03/21 Message-ID: #1/1 X-Deja-AN: 600397675 Sender: bobduff@world.std.com (Robert A Duff) References: <8a9eeg$qtv$1@newpoisson.nosc.mil> <38CA05AF.7E77790D@online.no> <8ang7v$peo$1@newpoisson.nosc.mil> <8ao2mm$ib7$1@nnrp1.deja.com> <8b6gr3$5a6$1@newpoisson.nosc.mil> Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 2000-03-21T00:00:00+00:00 List-Id: claveman@cod.nosc.mil (Charles H. Sampson) writes: > But it doesn't exactly meet my needs, Robert. I don't even think > it's correct to say that it comes close to meeting my needs. Not having a certain "*" operator seems very close indeed to having it, but not being allowed to call it. Yes, it's different in certain cases that cause ambiguity, but I can't get excited about these rather rare cases. > For all I know, the abstract approach can cause problems other than > ambiguities as well. Well, you have to admit, *that's* a pretty weak argument. ;-) > The behavior of generics is even further away from what I want. The issue with generics is the same, whether abstract works the way it does, or the way you would like it to, and whether you spell it "abstract" or "disllowed" or whatever. The problem is that inside the generic, we have this numeric type, and we legally call "*". Now what should that do in an instance where there is no "*" (or where there is a "*" but it's supposed to be illegal to call it)? Do you have a proposed solution to that? I agree that the current Ada solution is less than satisfactory. >... I > haven't verified it myself yet, but several people in this thread have > said that an abstract operation reverts to non-abstract in a generic > instantiation. For an operation that has been disallowed, there is > nothing to revert to. So what does it do, in your proposal? You have to give run-time semantics, or invent some way to make it illegal. - Bob