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 07:56:46 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!csn!magnus.acs.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!EU.net!chsun!mlma11.matrix.ch!user From: Mats.Weber@matrix.ch (Mats Weber) Subject: Re: Ada.strings.bounded problems? Message-ID: Sender: usenet@eunet.ch Organization: ELCA Matrix SA References: <3f3rl7$kts@watnews1.watson.ibm.com> <3fduto$ta7@watnews1.watson.ibm.com> <3fj8gs$h9b@watnews1.watson.ibm.com> <1995Jan19.124412@lglsun.epfl.ch> <3fmnc1$rns@watnews1.watson.ibm.com> Date: Mon, 23 Jan 1995 15:56:46 GMT Date: 1995-01-23T15:56:46+00:00 List-Id: In article <3foq6h$9n3@gnat.cs.nyu.edu>, dewar@cs.nyu.edu (Robert Dewar) wrote: > There would be problems in implementation of generics with shared code if > equal were always compositional. Certainly a consideration (it would mean > that equality had to be passed in for all types, quite expensive). I would prefer the compiler giving me a warning like: "potential loss of ability to share generic instances" over one like this: "potential loss of some aspects of exported abstraction". > Second: it IS possible to define equality on non-limited types in Ada 83 > using the generic trick. This trick is well known, and widely used, so you > cannot ignore it in considering upwards compatibility. In article <3fmnc1$rns@watnews1.watson.ibm.com>, ncohen@watson.ibm.com wrote: > In article <1995Jan19.124412@lglsun.epfl.ch>, nebbe@lglsun.epfl.ch > (Robb Nebbe) writes: > > |> There couldn't have been any upward compatibility problems since you > |> couldn't override "=". > > That's what Jean Ichbiah thought, but John Goodenough proved him wrong. > > (A loophole resulted from the fact that you could override "=" for a > generic formal limited private type, but you could pass a nonlimited type > as the corresponding generic actual parameter.) I can't believe that the `Goodenough trick' is used as an excuse for not repairing the rules on "=". If there had been an AI on this trick, then it would certainly have been forbidden by some additional rule, as was clearly the intent in the design of the language. I'm not saying that it was a good idea to forbid overloading of "=", but that except for the Goodenough trick, Ada 83 was consistent in its treatement of "=" and the programmer never got ripped off by the language. Mats