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-18 08:23:33 PST Path: nntp.gmd.de!Germany.EU.net!howland.reston.ans.net!swrinde!gatech!udel!news.mathworks.com!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: comar@cs.nyu.edu (Cyrille Comar) Newsgroups: comp.lang.ada Subject: Re: Ada.strings.bounded problems? Date: 18 Jan 1995 11:23:33 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3fjfa5$j4d@lang8.cs.nyu.edu> References: NNTP-Posting-Host: lang8.cs.nyu.edu Date: 1995-01-18T11:23:33-05:00 List-Id: Mats.Weber@matrix.ch (Mats Weber) writes: : : type Pair is : record : First, : Second : Bounded_String; : end record; : : then "=" is broken for Pair. This situation is very bad because overriding : "=" on Bounded_String gives the programmer the feeling that the problem is : solved, but it reappears whenever a Bounded_String is used as a component : of a composite type. This is not true if Bounded_String is implemented as a tagged type since in this case the *primitive* "=" on Bounded_String is used in the *predefined* "=" on Pair. So there is a way of having it safe... Although implementing Bounded_String as a tagged type just for that purpose seems an overkill. -- ------------------------------------------------------------------------ Cyrille Comar, E-mail: comar@cs.nyu.edu Gnat Project US phone: (212) 998-3489