Eric Hughes <eric.eh9@[EMAIL PROTECTED]
> writes:
> On Apr 12, 1:46 pm, Georg Bauhaus <rm.tsoh.plus-
> bug.bauh...@[EMAIL PROTECTED]
> wrote:
>> The fixed String is an array, a basic and central piece of Ada.
>> Unbounded_String is not an array.
>
> Sure, you can have your array; I have no issue at all with that. But
> Ada.Strings.String is just not a string, not in the way it does
> padding, not in its absence of concatenation.
There is no such thing as Ada.Strings.String. I thought maybe you meant
the package Ada.Strings.Fixed, but that package has no type. It uses
the predefined type String (which is declared in Standard, and
therefore visible everywhere), and it _does_ have concatenation ops.
So I don't understand what you mean.
I agree that blank-padding is a nearly useless thing to do.
But you can do a lot with fixed-length strings, so long
as you program them in a mostly-functional style.
>> Both types use the word "string" in their name, which is
>> unfortunate.
>
> I consider it more than unfortunate. I consider it just plain wrong.
String and Unbounded_String are both strings of characters,
so I don't see why it's "plain wrong". It might be better
to call them Fixed_String and String, I suppose -- the
reason for the names is historical (String predates Unbounded_String).
Adding some (near-useless) operations on String that do blank-padding
doesn't suddenly make String not a string type.
- Bob


|