From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,640b65cbfbab7216 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newspump.monmouth.com!newspeer.monmouth.com!newsswitch.lcs.mit.edu!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada.Strings.Bounded Date: Sun, 13 Apr 2008 16:10:36 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <47F26C46.3010607@obry.net> <44d88b93-6a90-4c18-8785-2164934ba700@a9g2000prl.googlegroups.com> <47F652F7.9050502@obry.net> <47f7028d$1_6@news.bluewin.ch> <47F749CB.30806@obry.net> <480111a5$0$23695$9b4e6d93@newsspool2.arcor-online.net> <5d94b37c-20cd-46cf-b4c9-94bd2047c438@b5g2000pri.googlegroups.com> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1208117436 11273 192.74.137.71 (13 Apr 2008 20:10:36 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Sun, 13 Apr 2008 20:10:36 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:iDHLRYPanN7T5DRruxxelXuvh4g= Xref: g2news1.google.com comp.lang.ada:20917 Date: 2008-04-13T16:10:36-04:00 List-Id: Eric Hughes writes: > On Apr 12, 1:46 pm, Georg Bauhaus bug.bauh...@maps.futureapps.de> 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