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.9 required=5.0 tests=BAYES_00 autolearn=ham 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 01:18:16 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!fu-berlin.de!uni-berlin.de!ailinel.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry Kazakov) Newsgroups: comp.lang.ada Subject: Re: ada vs. cpp Date: Mon, 08 Oct 2001 08:18:15 GMT Message-ID: <3bc15a16.1317281@news.cis.dfn.de> References: <9pgr68$7pu1@news.cis.okstate.edu> <3bbd6287.346843109@news.cis.dfn.de> <9pkco7$9qe1@news.cis.okstate.edu> NNTP-Posting-Host: ailinel.cbb-automation.de (212.79.194.99) X-Trace: fu-berlin.de 1002529095 21009354 212.79.194.99 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:13904 Date: 2001-10-08T08:18:15+00:00 List-Id: On 5 Oct 2001 13:31:51 GMT, David Starner wrote: >On Fri, 05 Oct 2001 07:50:09 GMT, Dmitry Kazakov wrote: >> In any case, as many have pointed, it is a bit ridiculous to compare >> Ada's strings with C++ having no strings at all. > >What's with Ada people going "they designed foo differently, so they >don't have foo at all"? C/C++ people can certainly input and process >string data, and that's what matters, not whether it's a null-terminated >array or a double-linked list of pointers to characters. This is true, but it does not mean that C++ has strings. We do can process string data using Turing machine. What we can is not what we have. Yes, in C++ one may develop a string class, as well as an integer class that checks overflows, and a fixed-point numeric class etc. It is nice. Moreover it is a clear advantage to have as little predefined types as possible. But, IFF those particular user-defined types could be made as efficient as built-in ones and have the same application area. Unfortunately this is not the case. There are lot of things you cannot do if strings are user-defined. Inevitable heap use is only one problem. Lack of compile time string constants is another. An inability to have comprehensive string slices is a third one etc. Regards, Dmitry Kazakov