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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news.germany.com!news.osn.de!diablo2.news.osn.de!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Bounded_Strings Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <47F26C46.3010607@obry.net> <44d88b93-6a90-4c18-8785-2164934ba700@a9g2000prl.googlegroups.com> <47F652F7.9050502@obry.net> <444c0bf9-a2ad-4280-8d69-58d59938f69e@d2g2000pra.googlegroups.com> Date: Sat, 5 Apr 2008 09:30:30 +0200 Message-ID: <1tgn4av0s35bj.1xdkgm7hg8psa.dlg@40tude.net> NNTP-Posting-Date: 05 Apr 2008 09:30:30 CEST NNTP-Posting-Host: fb0c578b.newsspool1.arcor-online.net X-Trace: DXC=3hm>k_[KCe]V;Ef1`Jk54\ic==]BZ:af^4Fo<]lROoRQ8kFcfPAaE009Wi@_nA[=KW=T X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:20831 Date: 2008-04-05T09:30:30+02:00 List-Id: On Fri, 4 Apr 2008 23:55:56 -0500, Randy Brukardt wrote: > "Adam Beneschan" wrote in message > news:444c0bf9-a2ad-4280-8d69-58d59938f69e@d2g2000pra.googlegroups.com... > ... >> Again, this doesn't sound reasonable in the context of the sort of >> "business applications" that I used to work on in COBOL. For other >> types of applications, it's probably OK, or Ada.Strings.Unbounded may >> be best. The reason I'm even thinking about all this is that I had >> been hoping for a number of years now that Ada would be able to make >> inroads into "business" applications and maybe be seen as an >> alternative to COBOL, and I'm a bit disappointed that, AFAIK, nothing >> or very little has happened in that arena. Not that I think >> Ada.Strings.Bounded is a major reason for this, or that providing a >> better string-handling facility would help at all. (shrug) > > I think that the inability to write a package that "naturally" uses literals > (and possibly indexing and slicing) for a private type are also large > impediments. + classes of all types. All string types shall become members of one class. > (Worse, the current string packages cannot be retrofitted to > use such a capability even if it was added to Ada, lessening the possibility > of doing that.) Why is this a problem? Old packages could be re-implemented using new features with the specifications left as-is for backward compatibility. > Net-net, I think the string packages are a disaster: just good enough to > prevent them from being properly replaced, but not good enough to use in a > natural way. (And Ada doesn't do anything useful to support UTF-8, which > doesn't help matters any.) I see encodings as a different and more difficult problem. All strings are implementations of an abstract array interface. With different encoding not only the arrays, but also their elements will have a class: ASCII, Latin-1, UCS-2, full Unicode. I have no idea how to handle that keeping all strings in one class. Further, there is the presentation layer (when, say, UTF-8 is seen as a sequence of octets). I am not sure if that need to be exposed. Probably it has to be in order to interface other languages. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de