From: Robert A Duff <bobduff@world.std.com>
Subject: Re: Desirability of C++
Date: 2000/05/03
Date: 2000-05-03T00:00:00+00:00 [thread overview]
Message-ID: <wcc7ldblluu.fsf@world.std.com> (raw)
In-Reply-To: 8eonat$sqj3@ftp.kvaerner.com
"Tarjei T. Jensen" <tarjei.jensen@kvaerner.com> writes:
> Robert A Duff wrote
> >The designer of Ada.Strings.Unbounded (Ben Brosgol) considered doing it
> >as in the above-mentioned package. The reason not to do it that way is
> >documented in the AARM -- assignment statements don't work properly.
> >That is, if you assign a 5-character string (whose max length is 80) to
> >a string variable whose max is 120, you will get a Constraint_Error,
> >even though 5 characters fit nicely in 120. JPR points this out in the
> >documentation for his package, and he provides a procedure for copying
> >strings, which should be used instead of assignment.
>
> A more natural conclusion would be that there was a language problem.
That *was* the conclusion.
>...In order
> to fix it one would either have to make the compiler aware of strings, make it
> possible to tell the compiler about what controls the size of a variable sized
> object like a counted string or make it possible to override the assignment
> operator.
All of those changes were considered too big.
> It would be convenient to be able to tell the compiler how to access the
> character array in string types other than the ordinary ada string. It would
> save a lot of copying. And it should be quite safe since routines that use the
> ordinary string types cannot change the length of the string.
>
> >Apparently, Turbo Pascal actually makes assignment work, which is
> >obviously preferable to either of the above Ada alternatives. On the
> >other hand, there are lots of *other* things wrong with the Turbo Pascal
> >solution, which have been pointed out in this thread.
>
> I think it was the ucsd-pascal people who first got it right.
They got some things right, and some things wrong. For example, the
limit of 255 characters is pretty annoying -- even in the bad old days
of smaller memories.
> C has only one string type.
C doesn't even have a character type, much less a string type! It has
an integer type called char, it has pointers to [arrays of] those, it
has character literal and string literal notations, it has a
nul-termination convention, and a few library routines. But it doesn't
have the most basic things you want, such as carrying the length with
the string, comparison operators, assignment operator.
>... It works reasonably well. Probably the most
> important "feature" is that everything is by reference, so there is no problems
> with strings of different sizes, etc.
- Bob
next prev parent reply other threads:[~2000-05-03 0:00 UTC|newest]
Thread overview: 176+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-02-04 0:00 where can we get a job with ada HollymaN
2000-02-03 0:00 ` David Kristola
2000-02-04 0:00 ` EKoerber
2000-02-04 0:00 ` Ted Dennison
2000-02-04 0:00 ` Brian Rogoff
2000-02-05 0:00 ` David Kristola
2000-02-06 0:00 ` Simon Brady
2000-02-07 0:00 ` Ted Dennison
2000-02-07 0:00 ` Gareth
2000-02-07 0:00 ` Kent Paul Dolan
2000-02-07 0:00 ` Gareth
2000-02-08 0:00 ` Kent Paul Dolan
2000-02-11 0:00 ` where can we ... [off topic] Nick Roberts
2000-02-07 0:00 ` where can we get a job with ada Simon Brady
2000-02-07 0:00 ` Ted Dennison
2000-02-12 0:00 ` Jeff Carter
2000-02-28 0:00 ` Florian Weimer
2000-02-29 0:00 ` Ted Dennison
2000-03-01 0:00 ` Wes Groleau
2000-03-04 0:00 ` Robert B. Love
2000-03-05 0:00 ` Ted Dennison
2000-03-05 0:00 ` Ada on International Space Station (Re: where can we get a job with ada) Vladimir Olensky
2000-03-08 0:00 ` Robert B. Love
2000-03-08 0:00 ` Vladimir Olensky
2000-03-08 0:00 ` Jean St-Pierre
2000-04-03 0:00 ` Andrew Thomas Wilson
2000-04-12 0:00 ` David Hoffman
2000-04-13 0:00 ` Robert B. Love
2000-04-14 0:00 ` Desirability of C++ (was Re: Ada on International Space Station (Re: where can we get a job with ada)) David Kristola
2000-04-14 0:00 ` Wes Groleau
2000-04-14 0:00 ` Desirability of C++ Stanley R. Allen
2000-04-14 0:00 ` Marin D. Condic
2000-04-15 0:00 ` Tarjei T. Jensen
2000-04-15 0:00 ` Marin D. Condic
2000-04-15 0:00 ` Tarjei T. Jensen
2000-04-17 0:00 ` Alfred Hilscher
2000-04-17 0:00 ` Gautier
2000-04-18 0:00 ` Pascal Obry
2000-04-18 0:00 ` Tarjei T. Jensen
2000-04-18 0:00 ` Gautier
2000-04-28 0:00 ` Richard D Riehle
2000-05-02 0:00 ` Tarjei T. Jensen
2000-04-23 0:00 ` David Kristola
2000-04-18 0:00 ` Tarjei T. Jensen
2000-04-17 0:00 ` Alfred Hilscher
2000-04-17 0:00 ` Marin D. Condic
2000-04-17 0:00 ` Gary Scott
2000-04-28 0:00 ` Richard D Riehle
2000-04-30 0:00 ` Robert B. Love
2000-05-01 0:00 ` Richard D Riehle
2000-05-01 0:00 ` E. Robert Tisdale
2000-04-30 0:00 ` Keith Thompson
2000-05-01 0:00 ` E. Robert Tisdale
2000-05-01 0:00 ` Keith Thompson
2000-05-01 0:00 ` Ted Dennison
2000-05-01 0:00 ` Gautier
2000-05-01 0:00 ` E. Robert Tisdale
2000-05-01 0:00 ` Pat Rogers
2000-05-01 0:00 ` E. Robert Tisdale
2000-05-01 0:00 ` Pat Rogers
2000-05-01 0:00 ` Michael P. Walsh
2000-05-01 0:00 ` Pat Rogers
2000-05-01 0:00 ` E. Robert Tisdale
2000-05-02 0:00 ` Bill Greene
2000-05-01 0:00 ` David Starner
2000-05-01 0:00 ` David Starner
2000-05-01 0:00 ` Florian Weimer
2000-05-01 0:00 ` tmoran
2000-05-01 0:00 ` Lionel Draghi
2000-05-02 0:00 ` Florian Weimer
2000-05-01 0:00 ` David Starner
2000-05-01 0:00 ` Ted Dennison
2000-05-01 0:00 ` Tarjei Tj�stheim Jensen
2000-05-01 0:00 ` Ted Dennison
2000-05-02 0:00 ` Preben Randhol
2000-05-02 0:00 ` Florian Weimer
2000-05-02 0:00 ` Application in Ada (was Desirability of C++) Jean-Pierre Rosen
2000-05-02 0:00 ` Ted Dennison
2000-05-02 0:00 ` Jean-Pierre Rosen
2000-05-03 0:00 ` Tarjei Tj�stheim Jensen
2000-05-03 0:00 ` Ted Dennison
2000-05-01 0:00 ` Desirability of C++ Pat Rogers
2000-05-01 0:00 ` Ted Dennison
2000-05-01 0:00 ` E. Robert Tisdale
2000-05-01 0:00 ` Pat Rogers
2000-05-01 0:00 ` Gautier
2000-05-01 0:00 ` Marin D. Condic
2000-05-01 0:00 ` Hyman Rosen
2000-05-01 0:00 ` Tarjei Tj�stheim Jensen
2000-05-01 0:00 ` tmoran
2000-05-02 0:00 ` Tarjei T. Jensen
2000-05-02 0:00 ` Preben Randhol
2000-05-02 0:00 ` Strings TP/Ada (was Desirability of C++) Gautier
2000-05-02 0:00 ` Desirability of C++ Keith Thompson
2000-05-03 0:00 ` Tarjei T. Jensen
2000-05-03 0:00 ` Robert A Duff
2000-05-02 0:00 ` Gautier
2000-05-02 0:00 ` Jean-Pierre Rosen
2000-05-02 0:00 ` Gautier
2000-05-02 0:00 ` Jean-Pierre Rosen
2000-05-03 0:00 ` Marin D. Condic
2000-05-03 0:00 ` Jean-Pierre Rosen
2000-05-03 0:00 ` Wes Groleau
2000-05-04 0:00 ` Robert I. Eachus
2000-05-05 0:00 ` Marin D. Condic
2000-05-03 0:00 ` Robert A Duff
2000-05-03 0:00 ` Jean-Pierre Rosen
2000-05-02 0:00 ` Robert A Duff
2000-05-03 0:00 ` Robert I. Eachus
2000-05-03 0:00 ` Robert A Duff
2000-05-04 0:00 ` Robert I. Eachus
2000-05-03 0:00 ` Tarjei T. Jensen
2000-05-03 0:00 ` Pascal Obry
2000-05-03 0:00 ` Paul Graham
2000-05-03 0:00 ` Pascal Obry
2000-05-03 0:00 ` Paul Graham
2000-05-03 0:00 ` Robert A Duff
2000-05-04 0:00 ` Ole-Hjalmar Kristensen
2000-05-04 0:00 ` Preben Randhol
2000-05-04 0:00 ` Ole-Hjalmar Kristensen
2000-05-04 0:00 ` Preben Randhol
2000-05-04 0:00 ` Pascal Obry
2000-05-05 0:00 ` Gautier
2000-05-04 0:00 ` Ole-Hjalmar Kristensen
2000-05-03 0:00 ` Robert A Duff [this message]
2000-05-03 0:00 ` Delphi Strings (was Re: Desirability of C++) Ray Blaak
2000-05-02 0:00 ` Desirability of C++ Al Christians
2000-05-02 0:00 ` Gautier
2000-05-01 0:00 ` Gautier
2000-05-01 0:00 ` Brian Rogoff
2000-05-02 0:00 ` Gautier
2000-05-02 0:00 ` Ole-Hjalmar Kristensen
2000-05-02 0:00 ` Richard D Riehle
2000-05-01 0:00 ` Tarjei Tj�stheim Jensen
2000-05-01 0:00 ` Gautier
2000-05-01 0:00 ` Pascal Obry
2000-05-01 0:00 ` Gautier
2000-05-01 0:00 ` Ted Dennison
2000-05-01 0:00 ` Tarjei Tj�stheim Jensen
2000-05-07 0:00 ` ANTHONY GAIR
2000-05-07 0:00 ` Richard D Riehle
2000-05-07 0:00 ` ANTHONY GAIR
2000-05-08 0:00 ` Pascal Obry
2000-05-08 0:00 ` Ehud Lamm
2000-05-08 0:00 ` Larry Kilgallen
2000-05-08 0:00 ` Stanley R. Allen
2000-05-09 0:00 ` Richard D Riehle
2000-05-08 0:00 ` Mario Klebsch
2000-05-08 0:00 ` E. Robert Tisdale
2000-05-08 0:00 ` Gautier
2000-05-09 0:00 ` Stanley R. Allen
2000-05-10 0:00 ` Mario Klebsch
2000-05-10 0:00 ` Alfred Hilscher
2000-05-07 0:00 ` Robert Dewar
2000-05-07 0:00 ` Hyman Rosen
2000-05-07 0:00 ` ANTHONY GAIR
2000-05-08 0:00 ` Hyman Rosen
2000-05-09 0:00 ` Pascal Obry
2000-05-11 0:00 ` wv12
2000-05-11 0:00 ` Frank J. Lhota
2000-05-11 0:00 ` Warner Bruns
2000-05-18 0:00 ` Warner Bruns
2000-05-19 0:00 ` ANTHONY GAIR
2000-05-24 0:00 ` Richard Kenner
2000-05-18 0:00 ` ANTHONY GAIR
2000-05-01 0:00 ` Tarjei Tj�stheim Jensen
2000-05-01 0:00 ` Ken Garlington
2000-04-29 0:00 ` Ada on International Space Station (Re: where can we get a job with ada) Chris Johnston
2000-05-01 0:00 ` Ted Dennison
2000-05-01 0:00 ` Desirability of C++ Larry Kilgallen
[not found] ` <7EA1B852F5D4D8C6.26EEE9181C8Reply-To: Kilgallen@eisner.decus.org.nospam <Ij4OaidfGTH8@eisner.decus.org>
2000-05-01 0:00 ` E. Robert Tisdale
2000-03-22 0:00 ` where can we get a job with ada Florian Weimer
2000-03-05 0:00 ` David Kristola
2000-02-04 0:00 ` Stanley R. Allen
2000-02-04 0:00 ` Stanley R. Allen
2000-02-06 0:00 ` David Tannen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox