comp.lang.ada
 help / color / mirror / Atom feed
From: Ben Brosgol <brosgol@world.std.com>
Subject: Re: Slice and Unbounded String
Date: 1996/12/01
Date: 1996-12-01T00:00:00+00:00	[thread overview]
Message-ID: <32A2080F.3766@world.std.com> (raw)
In-Reply-To: dewar.849445209@merv


Robert Dewar wrote:
> 
> Bob Duff said (of the bogus declaration of String_Access in
> Ada.Strings.Unbounded):
> 
> "Somebody stuck this in at the last minute, just as a convenience."
> 
> Are you sure of this? Who? And why did it end up so obviously in the
> wrong place? With a bogus justification:
> 
> 75   The type String_Access provides a (non-private) access type for explicit
> processing of unbounded-length strings.  The procedure Free performs an
> unchecked deallocation of an object of type String_Access.
> 
> Since the type String_Access has nothing whatsoever to do with the
> type Unbounded_String, I find the wording in para 75 incomprehensible.
> 
> Mind you a standard String_Access type would be a VERY helpful addition
> to the language, because then everyone could use it easily, and you would
> get better interchangable reuse of standard components using this type.
> 
> Ada.Strings would be a good place to put it, since there is almost
> nothing there now, but you definitely do NOT want to casually drag
> in Strings.Unbvounded just to get this definition.

I am the "somebody" whom you can blame (or thank :-) for the presence of
String_Access and the accompanying Free procedure in
Ada.Strings.Unbounded.
Contrary to Bob Duff's comment, this was not done at the last minute 
(sorry but I recently tossed out my earlier versions of the RM so I
can't 
pinpoint exactly when it was introduced.)  The declarations could not go
in 
Ada.Strings since we wanted to keep Ada.Strings Pragma(Pure)-able, and
pure packages are not allowed to declare (named) access types.

As this thread has suggested, the access type is declared in a
predefined
package as a convenience to the programmer, since it is quite common to
need
to deal with access values designating String objects.  Whether
Ada.Strings.Unbounded
is the best place for it is arguable, I suppose, but there did not
seem to be a more appropriate home.

Ben Brosgol
Aonix
brosgol@aonix.com




  reply	other threads:[~1996-12-01  0:00 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <01bbdc70$2e557160$262a6282@cln49ae>
1996-11-27  0:00 ` Slice and Unbounded String Robert A Duff
1996-11-30  0:00   ` Robert Dewar
1996-12-01  0:00     ` Robert A Duff
1996-12-01  0:00       ` Robert Dewar
1996-12-01  0:00         ` Ben Brosgol [this message]
1996-12-09  0:00     ` Gnat v3.05 bug or compilation problem MAKOUDI Jaouad (Stag. Kermarrec)
1996-12-09  0:00       ` Root of a GNAT problem (was: " Peter Hermann
1996-12-09  0:00         ` Robert Dewar
1996-12-10  0:00           ` Ken Garlington
1996-12-10  0:00             ` Tom Moran
1996-12-11  0:00               ` Peter Hermann
1996-12-11  0:00                 ` Robert Dewar
1996-12-11  0:00               ` Larry Kilgallen
1996-12-11  0:00                 ` Norman H. Cohen
1996-12-11  0:00                   ` Tom Moran
1996-12-12  0:00                     ` Larry Kilgallen
1996-12-11  0:00                 ` Robert Dewar
1996-12-11  0:00               ` Robert Dewar
1996-12-12  0:00               ` John Cosby
1996-12-13  0:00                 ` Robert Dewar
1996-12-10  0:00             ` Robert Dewar
1996-12-09  0:00         ` Larry Kilgallen
1996-12-09  0:00           ` Robert Dewar
1996-12-10  0:00             ` Larry Kilgallen
1996-12-10  0:00               ` Robert Dewar
1996-12-10  0:00             ` Tom Moran
1996-12-11  0:00               ` Robert Dewar
1996-12-18  0:00               ` Ted Dennison
1996-12-18  0:00                 ` Tom Moran
1996-12-23  0:00                   ` Robert Dewar
1996-12-10  0:00             ` Peter Hermann
1996-12-10  0:00               ` Robert Dewar
1996-12-09  0:00         ` Norman H. Cohen
1996-12-09  0:00       ` Larry Kilgallen
1996-11-27  0:00 ` Slice and Unbounded String 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