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: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Equality operator overloading in ADA 83 Date: 1997/05/02 Message-ID: #1/1 X-Deja-AN: 238908641 References: Organization: New York University Newsgroups: comp.lang.ada Date: 1997-05-02T00:00:00+00:00 List-Id: Tucker said <> This sounds wrong (no additional burden). If you are using shared generics, then this means that you *always* have to provide a thunk for record equality for every record type, even in the (overwhelmingly common) case where you don't do equality checking in any case in the body. This causes extra overhead at runtime, which cannot be got rid of. 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). Then you would be able to make equality compose without the extra overhead of a tagged type at runtime ... (I am talking here not of ideal language design considerations, but practical considerations given Ada 95 as it is!)