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,c3a7c1845ec5caf9 X-Google-Attributes: gid103376,public From: bobduff@world.std.com (Robert A Duff) Subject: Re: Equality operator overloading in ADA 83 Date: 1997/05/02 Message-ID: #1/1 X-Deja-AN: 238936588 References: Organization: The World Public Access UNIX, Brookline, MA Newsgroups: comp.lang.ada Date: 1997-05-02T00:00:00+00:00 List-Id: In article , Robert Dewar wrote: >This sounds wrong (no additional burden). If you are using shared generics, >... If you're using the "always-share" model, then there so much extra overhead anyway, that I wouldn't cry about a little more. If you're using the "sometimes-share" model, then simply don't share when it causes overhead. This requires global (link-time) knowledge. Or let the programmer tell you when to share. >Thought: an interesting optimization in an Ada compiler would be to >recognize a tagged type that had no dispatching primitives (make any >primitives you have use 'Class), and then have the implementation >avoid generating a dispatch table in this case (perhaps you would >need a pragma to disable extensions as well). A compiler can do this optimization in the presence of pragma Restrictions(No_Dispatch). An implementation-defined pragma could make the granularity finer. (Of course, if you're inventing pragmas, you could just as well invent pragma Compose_Eq.) - Bob