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.7 required=5.0 tests=BAYES_00,INVALID_DATE, REPLYTO_WITHOUT_TO_CC 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-20 04:05:53 PST Path: pad-thai.cam.ov.com!bloom-beacon.mit.edu!panix!news.mathworks.com!udel!gatech!howland.reston.ans.net!pipex!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: Ada.strings.bounded problems? Date: 19 Jan 1995 21:59:29 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3fmnc1$rns@watnews1.watson.ibm.com> References: <3f3rl7$kts@watnews1.watson.ibm.com> <3fduto$ta7@watnews1.watson.ibm.com> <3fj8gs$h9b@watnews1.watson.ibm.com> <1995Jan19.124412@lglsun.epfl.ch> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1995-01-19T21:59:29+00:00 List-Id: 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.) In any event, there is an upward compatibility problem with Ada-83 limited types: package P is type T is limited private; function "=" (Left, Right: T) return Boolean; type R is record C: T; -- makes R limited ... end record; private type T is ...; end P; package body P is -- Neither T nor R is limited here, so R has an "=" operator, but -- it uses predefined "=" for type T to compare Left.C and Right.C. end P; -- Norman H. Cohen ncohen@watson.ibm.com