comp.lang.ada
 help / color / mirror / Atom feed
From: Ray Blaak <blaak@infomatch.com>
Subject: Delphi Strings (was Re: Desirability of C++)
Date: 2000/05/03
Date: 2000-05-03T00:00:00+00:00	[thread overview]
Message-ID: <ubt2nczhw.fsf_-_@infomatch.com> (raw)
In-Reply-To: wcc7ldblluu.fsf@world.std.com

Robert A Duff <bobduff@world.std.com> writes:
> > 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.

For Delphi 4 and above, at least, strings by default are long strings, which
an have arbitrary length (up to 2GB). They are also automatically garbage
collected and shared using copy-on-write semantics.

The {$H+/-} switch controls whether or not the "String" type represents long
strings or short strings (i.e. max 255 chars).

I find that the need to use explicitly bounded strings in Delphi programs is
very very rare. Most of the time strings are just used to hold "a bunch of
text". For that purpose they work very well and are pretty efficient.

My only complaint is that one cannot derive distinct string types. Supposedly
in Delphi one can do things like:

  type Name = type String; // this should be a distinct type
  var
     n : Name;
     s : String;
  begin
     s := 'hi there';
     n := s; // I want a compile error here.
  end;

-- 
Cheers,                                        The Rhythm is around me,
                                               The Rhythm has control.
Ray Blaak                                      The Rhythm is inside me,
blaak@infomatch.com                            The Rhythm has my soul.




  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               ` Simon Brady
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 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                     ` Jean St-Pierre
2000-03-08  0:00                     ` Vladimir Olensky
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                                     ` Tarjei Tj�stheim Jensen
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                                       ` Gautier
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                                               ` Al Christians
2000-05-02  0:00                                               ` Tarjei T. Jensen
2000-05-02  0:00                                                 ` Preben Randhol
2000-05-02  0:00                                                   ` Keith Thompson
2000-05-02  0:00                                                   ` Strings TP/Ada (was Desirability of C++) Gautier
2000-05-03  0:00                                                   ` Desirability of C++ 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                                                         ` Robert A Duff
2000-05-03  0:00                                                           ` Ray Blaak [this message]
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                                                                 ` Pascal Obry
2000-05-04  0:00                                                                 ` Preben Randhol
2000-05-04  0:00                                                                   ` Ole-Hjalmar Kristensen
2000-05-04  0:00                                                                     ` Preben Randhol
2000-05-05  0:00                                                             ` Gautier
2000-05-04  0:00                                                           ` Ole-Hjalmar Kristensen
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                                         ` Marin D. Condic
2000-05-01  0:00                                         ` E. Robert Tisdale
2000-05-01  0:00                                           ` Pat Rogers
2000-05-01  0:00                                             ` David Starner
2000-05-01  0:00                                               ` David Starner
2000-05-01  0:00                                               ` Pat Rogers
2000-05-01  0:00                                                 ` Ted Dennison
2000-05-01  0:00                                                   ` E. Robert Tisdale
2000-05-01  0:00                                                     ` Gautier
2000-05-01  0:00                                                     ` Pat Rogers
2000-05-01  0:00                                               ` Florian Weimer
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                                                       ` Florian Weimer
2000-05-02  0:00                                                       ` Preben Randhol
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++ Lionel Draghi
2000-05-02  0:00                                                   ` Florian Weimer
2000-05-01  0:00                                                 ` David Starner
2000-05-01  0:00                                                 ` tmoran
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                                       ` Ted Dennison
2000-05-01  0:00                                       ` Tarjei Tj�stheim Jensen
2000-05-01  0:00                                         ` Pascal Obry
2000-05-01  0:00                                           ` Tarjei Tj�stheim Jensen
2000-05-01  0:00                                           ` Gautier
2000-05-01  0:00                                             ` Ted Dennison
2000-05-01  0:00                                         ` Gautier
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                                           ` 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                                                 ` Alfred Hilscher
2000-05-10  0:00                                                 ` Mario Klebsch
2000-05-08  0:00                                           ` Stanley R. Allen
2000-05-09  0:00                                             ` Richard D Riehle
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                                               ` Warner Bruns
2000-05-18  0:00                                                 ` ANTHONY GAIR
2000-05-18  0:00                                                 ` Warner Bruns
2000-05-19  0:00                                                   ` ANTHONY GAIR
2000-05-24  0:00                                                   ` Richard Kenner
2000-05-11  0:00                                               ` Frank J. Lhota
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
     [not found]                       ` <7EA1B852F5D4D8C6.26EEE9181C8Reply-To: Kilgallen@eisner.decus.org.nospam <Ij4OaidfGTH8@eisner.decus.org>
2000-05-01  0:00                         ` Desirability of C++ E. Robert Tisdale
2000-05-01  0:00                       ` Larry Kilgallen
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