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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no 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-09 08:05:33 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: is ada dead? Date: Mon, 9 Jul 2001 10:27:36 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9icf0q$ken$1@nh.pace.co.uk> References: <3B460DA9.C2965042@ix.netcom.com> <9ff447f2.0107061757.34ca0723@posting.google.com> <9i6lak$bqi$1@geraldo.cc.utexas.edu> <3B475916.E4548A5D@worldnet.att.net> <3B47D830.830E4E31@worldnet.att.net> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 994688858 20951 136.170.200.133 (9 Jul 2001 14:27:38 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 9 Jul 2001 14:27:38 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-Mimeole: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:9674 Date: 2001-07-09T14:27:38+00:00 List-Id: The nice thing about Ada is that you can readily convert between the two type and possibly utilize the Bounded_String type as a compromise. For most of the things I do I use Unbounded_String because its fairly easy to move them around, append things, etc. A lot of string manipulation doesn't involve much editing, but does involve keeping track of length and/or moving the data from place to place. Unbounded_String makes this very easy by not having a static allocation & it is probably tolerably efficient for most stuff. If you *do* need to do some sort of heavy editing & a static allocation is more efficient, its pretty easy to hop into a subroutine that allocates a static string of the right size, convert the Unbounded_String, do the editing and go back. Of course, the necessity of doing this is probably pretty rare (relative to the total amount of string handling code that might exist in an app) and will be implementation dependent (some compilers may be more efficient with it than others.) On the whole, its just a matter of making the best use of the tools available & Ada certainly has a lot of tools in this area. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Stephen J. Bevan" wrote in message news:m31yns3s9v.fsf@yahoo.com... > Do you mean String or an Unbounded_String? IMHO a Java StringBuffer > has very similar properties to an Ada Unbounded_String. If you want > an equivalent of an Ada String, then the best approximation would be > char[] in Java. > >