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,bde6706c124e6eed X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wn13feed!worldnet.att.net!209.244.4.230!newsfeed1.dallas1.level3.net!news.level3.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Silly question about strings (was: Filenames in Ada) Date: 23 Nov 2005 22:58:01 -0600 Organization: LJK Software Message-ID: References: <1653090.31FM62oI6I@linux1.krischik.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1132808221 30700 192.135.80.34 (24 Nov 2005 04:57:01 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Thu, 24 Nov 2005 04:57:01 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:6575 Date: 2005-11-23T22:58:01-06:00 List-Id: In article , "Steve" writes: > This may be a silly question, but why aren't the character dependent > packages generic? > > It seems odd to have separate packages: > > Ada.Strings.Fixed; > Ada.Strings.Wide_Fixed; > Ada.Strings.Bounded; > Ada.Strings.Wide_Bounded; > Ada.Strings.Unbounded; > Ada.Strings.Wide_Unbounded; > Ada.Text_IO; > Ada.Wide_Text_IO; > > Instead of generic packages that use the character type as a parameter, with > predefined instatiations for character and wide_character similar to what is > done with numerics. Perhaps something along the lines of: > > package Ada.Strings.Fixed is new Ada.Strings.String_Base( Character ); > package Ada.Strings.Wide_Fixed is new Ada.Strings.String_Base( > Wide_Character ); > > and so on... > > It seems like this would eliminate issues with different character sets, and > avoid the need for a language revision when a 64 bit (or 128 bit) version of > Unicode arrives. I would expect those string packages (and especially the string IO packages) would use operating system facilities in some implementations. The underlying operating system calls might not be symmetric at all. The bodies might not even be written in Ada.