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!local01.nntp.dca.giganews.com!nntp.megapath.net!news.megapath.net.POSTED!not-for-mail NNTP-Posting-Date: Mon, 28 Nov 2005 21:13:56 -0600 From: "Randy Brukardt" Newsgroups: comp.lang.ada References: <1653090.31FM62oI6I@linux1.krischik.com> Subject: Re: Silly question about strings (was: Filenames in Ada) Date: Mon, 28 Nov 2005 21:17:50 -0600 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4952.2800 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4952.2800 Message-ID: <-N-dnbfOUufqWhbeRVn-sQ@megapath.net> NNTP-Posting-Host: 64.32.209.38 X-Trace: sv3-04ZPDmWbM57Bbm7wFHOSWOg5psRCU+wGZDgPKPtfCIEl9n0xE4m6CBMa13INuOV6E/ehWcWD8ojhtoa!DG4QenQY7D1TNCT1qtInyFzoEwCk5s7duHoF2buerwBgMin4P97X23eZP2VQ1GrbBcX5mUashz2q X-Complaints-To: abuse@megapath.net X-DMCA-Complaints-To: abuse@megapath.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news1.google.com comp.lang.ada:6660 Date: 2005-11-28T21:17:50-06:00 List-Id: "Steve" wrote in message news:oNmdneZx9ePFrBjenZ2dnUVZ_t2dnZ2d@comcast.com... > This may be a silly question, but why aren't the character dependent > packages generic? ... > 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 .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. Something like this was proposed as an 11th hour suggestion (this year). But it was thought to be just too late to design it properly, thus nothing was done with that. For Janus/Ada, such a generic would have terrible performance. Since we share all generic bodies, the code would have to deal with arrays of unknown size elements. Yuck. The predefined instantiations would help that some (as they wouldn't necessarily need to be implemented as generic instantiations), but user-defined string types would use real instantiations and probably would be unusable. Randy Brukardt.