comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: C vs. Ada - strings
Date: 2000/05/03
Date: 2000-05-03T00:00:00+00:00	[thread overview]
Message-ID: <8eprvb$jcf$1@nnrp1.deja.com> (raw)
In-Reply-To: 391061AF.A15CE59C@ftw.rsc.raytheon.com

In article <391061AF.A15CE59C@ftw.rsc.raytheon.com>,
  Wes Groleau <wwgrol@ftw.rsc.raytheon.com> wrote:
>
> Correct.  But the original statement was something like "even Ada 83
> strings are better than C strings."  When criticizing C, it's not fair
> to criticize it for what it is when you take away its standard
> libraries.
> Throughout my Ada-83 career, I have had to make extensive use of
> home-brewed code very similar to the Ada 95 sting packages.  If for

That's true. I'd still argue that *orignial* statement was right too.
But I'm probably treading the grounds of opinion there. Its a much more
debatable point.

In Ada 83's defense, I hardly ever felt like I missed better string
handling at the time. I usually had access to Ada.String.Unbounded -
like packages, and never used them. The only thing I think it really
*had* to have added was the case-conversion routines. Just about
everything else I can do fairly easily with slices, "&", and declare
blocks.

On the other hand, C's lack of these features pretty much
*required* it to come with standard string handling. Otherwise C users
would have been forced to write loops to perform even the most minor of
operations (like they are for every other type of array).

Folks who complain bitterly about Ada's strings usually never figured
out how to properly work with them (or perhaps never *bothered* to
figure it out). The mindset is very much different from C's.

So how do I summarize this? If we are talking about comparing the
languages themselves, C's strings clearly suck. If we include the
standard libraries in our comparison, they only suck when compared to
Ada 95. :-)

And no matter how you look at it, C's arrays suck.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-05-03  0:00 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-05-02  0:00 C vs. Ada - strings Wes Groleau
2000-05-02  0:00 ` Ted Dennison
2000-05-03  0:00   ` Wes Groleau
2000-05-03  0:00     ` Ted Dennison [this message]
2000-05-03  0:00   ` Pascal Obry
2000-05-03  0:00     ` Keith Thompson
2000-05-04  0:00       ` Wes Groleau
2000-05-18  0:00       ` Pete
2000-05-18  0:00         ` dale
2000-05-18  0:00           ` Robert A Duff
2000-05-19  0:00             ` dale
2000-05-21  0:00             ` Robert Dewar
2000-05-22  0:00               ` Robert A Duff
2000-05-22  0:00                 ` Keith Thompson
2000-05-24  0:00                 ` 'img Peter Hermann
2000-05-24  0:00                   ` 'img Robert Dewar
2000-05-24  0:00                     ` 'img Ted Dennison
2000-05-25  0:00                       ` 'img Peter Hermann
2000-05-25  0:00                         ` 'img Keith Thompson
2000-05-25  0:00                           ` 'img Ted Dennison
2000-05-26  0:00                         ` 'img dmitry
2000-05-26  0:00                           ` 'img Robert Dewar
2000-05-26  0:00                           ` 'img Brian Rogoff
2000-05-26  0:00                             ` 'img Robert Dewar
2000-05-25  0:00                       ` 'img Robert Dewar
2000-05-19  0:00         ` C vs. Ada - strings Geoff Bull
2000-05-19  0:00           ` mike
2000-05-21  0:00           ` Robert Dewar
2000-06-03  0:00           ` Pete
2000-06-03  0:00             ` Java vs. Ada - strings (was: C vs. Ada - strings) Ted Dennison
2000-06-04  0:00               ` Robert I. Eachus
2000-06-04  0:00               ` Pete
2000-06-04  0:00                 ` Jean-Pierre Rosen
2000-06-04  0:00                   ` Pete
2000-06-05  0:00                     ` Jean-Pierre Rosen
2000-06-05  0:00                 ` Ted Dennison
2000-06-05  0:00                   ` Marin D. Condic
2000-06-05  0:00                     ` David Botton
2000-06-05  0:00                       ` Marin D. Condic
2000-06-06  0:00                     ` Robert A Duff
2000-06-06  0:00                   ` Ken Garlington
2000-06-06  0:00                     ` Marin D. Condic
2000-06-03  0:00             ` C vs. Ada - strings Ken Garlington
2000-06-03  0:00               ` Ted Dennison
2000-06-04  0:00                 ` Ken Garlington
2000-06-04  0:00                 ` Dale Stanbrough
2000-05-04  0:00   ` Ole-Hjalmar Kristensen
2000-05-04  0:00     ` Gautier
2000-05-02  0:00 ` Larry Kilgallen
2000-05-02  0:00 ` Robert A Duff
2000-05-03  0:00   ` Wes Groleau
2000-05-03  0:00     ` Tarjei Tj�stheim Jensen
2000-05-03  0:00       ` Ted Dennison
2000-05-03  0:00   ` Tarjei T. Jensen
2000-05-03  0:00     ` Charles Hixson
2000-05-04  0:00     ` Robert Dewar
2000-05-04  0:00       ` Charles Hixson
2000-05-06  0:00       ` Tarjei Tj�stheim Jensen
2000-05-04  0:00   ` Robert Dewar
2000-05-04  0:00     ` Robert A Duff
2000-05-04  0:00       ` Robert Dewar
2000-05-05  0:00         ` Florian Weimer
2000-05-05  0:00           ` Pascal Obry
2000-05-05  0:00             ` Hyman Rosen
2000-05-06  0:00           ` Tarjei Tj�stheim Jensen
2000-05-06  0:00             ` Florian Weimer
2000-05-07  0:00               ` Robert Dewar
2000-05-09  0:00                 ` Florian Weimer
2000-05-04  0:00     ` Hyman Rosen
2000-05-04  0:00       ` Jon S Anthony
2000-05-04  0:00       ` Robert Dewar
2000-05-05  0:00 ` Florian Weimer
2000-05-05  0:00   ` Ted Dennison
2000-05-05  0:00   ` Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox