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.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,54c513170bafd693 X-Google-Attributes: gid103376,public From: Ole-Hjalmar Kristensen Subject: Re: Desirability of C++ Date: 2000/05/04 Message-ID: #1/1 X-Deja-AN: 619104080 Sender: ohk@gong2.clustra.com 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-Complaints-To: abuse@telia.no X-Trace: news.telia.no 957440554 195.204.160.194 (Thu, 04 May 2000 13:42:34 CEST) Organization: Telia Internet Public Access NNTP-Posting-Date: Thu, 04 May 2000 13:42:34 CEST Newsgroups: comp.lang.ada Date: 2000-05-04T00:00:00+00:00 List-Id: "Pascal Obry" writes: > Paul Graham a �crit dans le message <391060A6.7ABCDCFE@cadence.com>... > >Pascal Obry wrote: > >> Even to compare two strings you have to write: > >> if (strcmp (name1, name2) == 0) { > >> ... > >> I do prefer: > >> if name1 = name2 then > >> ... > > > >Just because the standard library provides a somewhat unreadable > >function like strcmp doesn't mean you have to use it directly. In C you > > > 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... This seems incredibly narrow-minded. Why is the notation so important to you if the same functionality is available? strcmp implements =, <, > strcpy implements := strlen implements 'length and as all arrays in C start with index 0, there is no need for 'first, and 'last is also given by strlen. > > So, we can't even compare strings in Ada and C! > > Pascal. > > --|------------------------------------------------------ > --| Pascal Obry Team-Ada Member > --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE > --|------------------------------------------------------ > --| http://perso.wanadoo.fr/pascal.obry > --| > --| "The best way to travel is by means of imagination" > > > > -- E pluribus Unix