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,54c513170bafd693 X-Google-Attributes: gid103376,public From: Paul Graham Subject: Re: Desirability of C++ Date: 2000/05/03 Message-ID: <3910840C.57847EF3@cadence.com>#1/1 X-Deja-AN: 618830527 Content-Transfer-Encoding: 7bit References: <390DEC7F.9429C82C@online.no><390E2A20.B647D0D6@maths.unine.ch> <8em8mb$evd$1@wanadoo.fr><390EEF24.BD36AA24@maths.unine.ch> <8eonat$sqj3@ftp.kvaerner.com> <8eoo6v$ers$1@wanadoo.fr> <391060A6.7ABCDCFE@cadence.com> <8eptms$7vq$1@wanadoo.fr> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Cadence Design Systems Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-05-03T00:00:00+00:00 List-Id: Pascal Obry wrote: > That was not my point. The problem is not the name, the problem is that > C does not have a string type so there is no operator on them =, <, >, := > and no attribute 'Length, 'Last, 'First... You can take 'Length of a STRING, but not 'Length of a Bounded_String. For Bounded_String, you are back to using functional notation: Length(s), which is just like you have for C. (The difference being that Length(s) is presumably a constant time operation for Bounded_String in Ada, but a linear time operation for char * in C.) It is annoying when an "improved" version of a type loses some operations over the basic version. So much for "referential transparency". Or is it possible to write something like: for Bounded_String'Length use Length(Bounded_String); ? Paul