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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,daca227a72518885,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-07 22:36:30 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.stueberl.de!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: "Andrew Carroll" Newsgroups: comp.lang.ada Subject: Re: Unbounded Strings Date: Tue, 7 Oct 2003 23:52:27 -0600 Organization: Cuivre, Argent, Or Message-ID: References: <20031007175516.DC2884C40C8@lovelace.ada-france.org> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1065591264 25188 80.67.180.195 (8 Oct 2003 05:34:24 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Wed, 8 Oct 2003 05:34:24 +0000 (UTC) To: Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Gateway to the comp.lang.ada Usenet newsgroup List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:439 Date: 2003-10-07T23:52:27-06:00 I read one of the list messages a few days ago about Unbounded_Strings. I used to post here frequently about Unbounded_String and String. If I remember correctly the post I read was about having a "universal" string in Ada or something like that. I might have agreed with them a few months ago, but now, I think it would be overkill. I have been working with Ada for about 8 months now. At first I struggled with the concept of the Ada String type and the Unbounded and Bounded length strings. The first month or so I thought to myself "what a whacked out language" because of all the "apparent" hassle of converting a string to an unbounded string or vice versa and etcetera. Then I was writting a sort of "hello world" C++ Common gateway interface program and for the life of me I couldn't figure out why strings in C/C++ were so easy. char * made it all clear. I did some experimenting, thanks to Cohen's book and persistance I found that I can define a pointer to a string type in Ada and allocate a new string when I want one of a different size, sort of like char* in C/C++, with the benefits of Ada bounds checking (if that still exist by default) and the memory management I briefly scanned over in the last comp.lang.ada email. So now I am using Ada like I never thought I could before and it's just as easy, if not easier at times than C/C++. Once I leaned my way around the packages that come with GNAT a bit I found myself wanting to use Ada with the Unix Visual Editor (VI) more and my fancy GUI IDE with C++ less. I found myself desingning more and debugging less. There were still problems of course, such as pass by value or pass by reference; I didn't know what to use nor did I know if I had to specify it. I found out when I created my first graph, you have to specify out paramter or in and out for the parameter or you get a copy instead of the actual "thing". Anyway, I'm babling about the success and pleasure I have had with Ada. I really just wanted to put my two cents in on the string thing. I don't think they need to be changed. It's the mindset of the programmer/designer that needs to changed. I remember wanting to switch to Ada because of a software engineering article I read that said Ada cut 40% off of some portion of software projects. Maybe it was 60%, I don't quite remember. Anyone know of that article? Pretty slim chance with my specific description of it eh? Well, take care Ada people. Andrew