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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4c86cf2332cbe682 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-23 05:37:35 PST Path: nntp.gmd.de!newsserver.jvnc.net!darwin.sura.net!pirates!gatech!swrinde!hookup!olivea!uunet!fdn.fr!univ-lyon1.fr!swidir.switch.ch!epflnews!dinews.epfl.ch!lglsun!nebbe From: nebbe@lglsun.epfl.ch (Robb Nebbe) Newsgroups: comp.lang.ada Subject: Re: Ada.strings.bounded problems? Date: 23 Jan 1995 13:37:35 GMT Organization: Ecole Polytechnique Federale de Lausanne Sender: nebbe@lglsun3.epfl.ch (Robb Nebbe) Distribution: world Message-ID: <1995Jan23.135503@lglsun.epfl.ch> References: <1995Jan19.185316.2225@nbivax.nbi.dk> <1995Jan20.120612@lglsun.epfl.ch> <3fomrv$7i9@disunms.epfl.ch> <3frlfa$rp2@gnat.cs.nyu.edu> NNTP-Posting-Host: lglsun3.epfl.ch Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: 1995-01-23T13:37:35+00:00 List-Id: dewar@cs.nyu.edu (Robert Dewar) writes: |> It is important to realize the hit on shared generics. THe design of Ada 95 |> has been carefully done to preserve the practicality of using shared |> generics, as is currently done by at least two implementations. In particular, |> suppose we have a simple generic with some discrete types as arguments. It |> seems unfortunate (both in terms of implementation complexity, and in |> efficiency) to require all equality operations to be done with thunks. And of course redefining equality on discrete types is a very common programming idiom. (For all those people who can't put up with the overhead of comparing those unused bits :-) This is a strawman. It would have made more sense (to me) to exclude discrete types, where the reemergence of primitive operations is much less likely to cause a problem and provide clean semantics for record types. What probably bothers Magnus and others is that the justifications for not providing semantics that are consistent with tagged types are all pragmatic. Clearly the semantics as they are defined, which allow the reemergence of predefined equality, are not desirable (or even justifyable) from a language design point of view; rather, they must be justified from on implementation point of view or other pragmatic concerns such as upwards compatability. (which are certainly legitimate) Maybe the cost of not providing consistant semantics between tagged and untagged record types will exceed the cost of introducing an upward incompatability, maybe not. It is a really tough call right now. Especially since there really isn't any data, just speculation, to base the decision on. Robb Nebbe