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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language Date: Tue, 3 Oct 2017 15:56:46 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <915874b5-52c0-4aa8-9023-82fddedb816f@googlegroups.com> <67345f73-530c-400b-9eb4-63eeb440154c@googlegroups.com> <9a6338d9-83be-4e45-b8b7-edc56e33537f@googlegroups.com> <2deb28e2-f7e8-4461-b8b8-c2c6cf2784aa@googlegroups.com> <5de470d2-aa3d-4c02-ae2b-266c33a289fe@googlegroups.com> NNTP-Posting-Host: MajGvm9MbNtGBKE7r8NgYA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 X-Notice: Filtered by postfilter v. 0.8.2 Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:48319 Date: 2017-10-03T15:56:46+02:00 List-Id: On 2017-10-03 15:25, G.B. wrote: > On 03.10.17 12:11, Dmitry A. Kazakov wrote: >>  It is not very likely you would actually use strings larger than 32K. > > When a program reads a text file, of size > 32K, into some string > ("into memory"), this can make text processing a lot easier. Single line is sufficient, if that is a text file. > Just > think about implementing an abstraction that allows scanning the > entire text in case there is no string large enough to contain it. That is a text buffer. Implementing text buffer on top of a single string is a bad idea. > String is the aftermath of our own bias when commencing the > work of formalization by analyzing our writing. It permeates > all programming to an extent that may be in the way of seeing > proper abstractions. It's close to making > >    array (Positive range <>) > > be so ubiquitous that it appears in the public interface > of just about any private type. And the above one doesn't, > does it? Same as number. Sequence of characters is a useful concept. And a fruitful interface of a user type. You can declare your own string type with the index type you wanted, but you cannot put it in the same class with String because Ada does not have abstract array interface. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de