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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.140.232.88 with SMTP id d85mr26066666qhc.0.1431434676276; Tue, 12 May 2015 05:44:36 -0700 (PDT) X-Received: by 10.140.99.44 with SMTP id p41mr201228qge.3.1431434676262; Tue, 12 May 2015 05:44:36 -0700 (PDT) Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!z60no6833659qgd.0!news-out.google.com!t92ni335qga.1!nntp.google.com!j5no6832746qga.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 12 May 2015 05:44:36 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=50.111.106.222; posting-account=Ies7ywoAAACcdHZMiIRy0M84lcJvfxwg NNTP-Posting-Host: 50.111.106.222 References: <47c7df1e-17c1-44cb-a455-43431f0d39cd@googlegroups.com> <85zj5wb9et.fsf@stephe-leake.org> <4b14659e-8c26-4c0a-8945-a5289740e054@googlegroups.com> <51c639dd-a48c-4130-becd-750cb23094da@googlegroups.com> <35aabdcd-6064-4999-9cdf-d143b0593a31@googlegroups.com> <13a13e0e-0de4-4235-9e1e-c6e0446d3f04@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <30d9ad09-ee34-4172-802a-152ab5e797f9@googlegroups.com> Subject: Re: Textedit and txt From: brbarkstrom@gmail.com Injection-Date: Tue, 12 May 2015 12:44:36 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: number.nntp.giganews.com comp.lang.ada:193146 Date: 2015-05-12T05:44:36-07:00 List-Id: > ... > > > Sorry to go back in the thread. However, instead of creating a new > > symbol '+' to indicate append, > > Sorry, but "+" here is for conversion to or from type String. It has nothing > to do with "append". > > The problem is that the conversion routine is named To_Bounded_String, which > is way too long to use in/with complex expressions. And the other way is > To_String, which is only a bit better. Especially if you are "use-adverse". > > The existing "&" work in some cases, but not others (for instance, the call > to Put in the OPs example). Moreover, they're the reason that the package > has to be junked, because we cannot have proper string literals and the like > with them around (that would make everything ambiguous). Avoiding those > mixed things makes the packages a lot more sane (but then a conversion > operator is required). > > Randy. > > > > > it might be easier to consult the Ada > > RM. In section A.4.4 of the Ada 2012 RM, there are a number of overloaded > > functions specifically called 'Append'. Furthermore, the second page of > > this > > section specifically uses '&' as an append operator. Since these two > > constructions are already part of the package `Bounded_String', it isn't > > clear > > what we gain by using a variant construction. > > > > Bruce B. "Strings" are complicated. Sedgewick and Wayne's book on "Algorithms, Fourth Edition" devotes about 150 pages to the subject. Unfortunately, the book is written in Java and the algorithm descriptions use Java code. The authors note that there are at least two abstract data types that programmers can use to represent strings and warn about "wide API's" that include so many objects and methods that they're impractical. Thus (and perhaps oddly), I agree with Dimity's comments. I don't agree with the notion of creating a "deprecated" category of items. Why copy Java? Bruce B.