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!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: Sat, 2 Sep 2017 13:04:27 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <4dc188de-802b-41ad-9cdd-b8246eb9a1c7@googlegroups.com> <47cc6474-8b75-4644-92d0-bd1f694c20e7@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 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:47885 Date: 2017-09-02T13:04:27+02:00 List-Id: On 2017-09-02 12:49, Vincent DIEMUNSCH wrote: > Regarding arrays I propose the following evolutions : > > 1. Allow discriminants in array types (if they are not unconstrained array types). > type Matrix (M,N : Positive) is array (1 .. M, 1 .. N) of Long_Float. Yes, all types must be allowed to have discriminants. However, I would treat array bounds as discriminants too. The problem is removing discriminants upond constraining. This seems to be why discriminants were not allowed in the first place. > 2. Allow a special indexing syntax, that I called relative indexing. > Adding a Unary + operator (that has no other purpose ! :-) ) in front of > an index expression means starting from A'First. Unary plus would then > become the ordinal operator. > > A(+i) simply means A(A'First +i). A better approach is to allow positional indexing by universal integer offset (0-based) or position (1-based). A [N] means N-th element A'Span would be a positional equivalent to A'Range Offset vs. position is up to debate. And C-freaks will finally have their ugly square brackets back! (:-)) -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de