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,7bcba1db9ed24fa7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-07 11:44:23 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.uchicago.edu!vixen.cso.uiuc.edu!howland.erols.net!newsfeed.wirehub.nl!news.stealth.net!204.127.161.2.MISMATCH!wn2feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3B475916.E4548A5D@worldnet.att.net> From: James Rogers X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: is ada dead? References: <3B460DA9.C2965042@ix.netcom.com> <9ff447f2.0107061757.34ca0723@posting.google.com> <9i6lak$bqi$1@geraldo.cc.utexas.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 07 Jul 2001 18:44:22 GMT NNTP-Posting-Host: 12.86.35.186 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 994531462 12.86.35.186 (Sat, 07 Jul 2001 18:44:22 GMT) NNTP-Posting-Date: Sat, 07 Jul 2001 18:44:22 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:9609 Date: 2001-07-07T18:44:22+00:00 List-Id: Larry Kilgallen wrote: > > In article <9i6lak$bqi$1@geraldo.cc.utexas.edu>, "Bobby D. Bryant" writes: > > It looks to me that the family C, C++, Java, and C# show a teleological > > evolutionary trend toward becoming an Ada clone. > > I don't think they will ever forsake their null-terminated strings. That may be true for C, but C++ now has a String class, which is not just a wrapper for the more primitive C strings. Java has a String class which is also not null termintated. The Java String class is closer to an Ada Unbounded string, with everything dynamically allocated. Of course, the Java String suffers from the same inefficiencies as an Ada Unbounded string. For instance, you cannot edit a Java String. There are Java methods to change the value of a character at a specified position. The result, however, is not strictly an edited string. It is an entirely new string, with all the characters copied and the edited character replacing the original. In other words, if you want to loop through all the characters in an existing 1024 character String, replacing each one, you will require the creation and garbage collection of 1024 1024 character strings. Since Java characters are all 16 bits, this means that you need to chew up over 2 Megabytes of data to edit a 1024 character String. Clearly, Java has abandoned the C null terminated string. Clearly they have also abandoned any approximation of efficiency in String handling. Jim Rogers Colorado Springs, Colorado USA