From: "Andrew Carroll" <andrew@carroll-tech.net>
To: <comp.lang.ada@ada-france.org>
Subject: Re: Unbounded Strings
Date: Tue, 7 Oct 2003 23:52:27 -0600
Date: 2003-10-07T23:52:27-06:00 [thread overview]
Message-ID: <mailman.47.1065591264.25614.comp.lang.ada@ada-france.org> (raw)
In-Reply-To: 20031007175516.DC2884C40C8@lovelace.ada-france.org
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
next parent reply other threads:[~2003-10-08 5:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20031007175516.DC2884C40C8@lovelace.ada-france.org>
2003-10-08 5:52 ` Andrew Carroll [this message]
2003-10-08 6:22 ` Unbounded Strings Preben Randhol
2003-10-08 13:10 ` Marin David Condic
2003-10-08 13:19 ` Steve O'Neill
2003-10-08 18:46 ` Jeffrey Carter
2003-10-08 23:55 ` Mark Lorenzen
2003-10-09 18:23 ` Craig Carey
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox