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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1cf653444208df72 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-08 11:02:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!news-in-sanjose!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <9pgr68$7pu1@news.cis.okstate.edu> <9phnic$9g5$1@nh.pace.co.uk> <5fkv7.134136$w7.19988807@news02.optonline.net> Subject: Re: ada vs. cpp Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 08 Oct 2001 14:02:23 EDT Organization: http://www.newsranger.com Date: Mon, 08 Oct 2001 18:02:23 GMT Xref: archiver1.google.com comp.lang.ada:13951 Date: 2001-10-08T18:02:23+00:00 List-Id: In article , Pascal Obry says... > > >"Mike Mohr" writes: > >> C++ has a string class. > >I know. Yet in C/C++ it is hard to beat > > V1 : constant String := "1234567890"; > V2 : constant String := "AAA" & V1 (3 .. V1'Last - 2) & "BBB"; > >in readability and ease of use. In C++ that would be: string V1 = "1234567890"; string V2 = "AAA" + V1.substr (2, V1.length() - 3) + "BBB"; It isn't better, but I don't really think its much worse either. The only real problem is that we are working with stack objects in Ada, whereas the C++ version is almost certianly involving dynamic allocation and deallocation. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.