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.99.110.9 with SMTP id j9mr6507207pgc.141.1504349365940; Sat, 02 Sep 2017 03:49:25 -0700 (PDT) X-Received: by 10.36.121.145 with SMTP id z139mr34621itc.0.1504349365902; Sat, 02 Sep 2017 03:49:25 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!paganini.bofh.team!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!b76no361080itb.0!news-out.google.com!80ni1038itk.0!nntp.google.com!127no59681itw.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 2 Sep 2017 03:49:25 -0700 (PDT) In-Reply-To: <4dc188de-802b-41ad-9cdd-b8246eb9a1c7@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=176.187.90.130; posting-account=hya6vwoAAADTA0O27Aq3u6Su3lQKpSMz NNTP-Posting-Host: 176.187.90.130 References: <4dc188de-802b-41ad-9cdd-b8246eb9a1c7@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <47cc6474-8b75-4644-92d0-bd1f694c20e7@googlegroups.com> Subject: Re: Community Input for the Maintenance and Revision of the Ada Programming Language From: Vincent DIEMUNSCH Injection-Date: Sat, 02 Sep 2017 10:49:25 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:47884 Date: 2017-09-02T03:49:25-07:00 List-Id: Le mardi 29 ao=C3=BBt 2017 01:49:15 UTC+2, far...@gmail.com a =C3=A9crit=C2= =A0: > For me, Ada is a wonderful language for my engineering calculations. > I have built my own tools including operator overloads for real, imaginar= y, complex, and integer scalars, > mating with overloads for vector and mat= rix types. Would you be ready to share this ? > Oddly missing from Ada, and commented about on this list before, is why b= rackets [ ] aren't used for=20 > array indexing. True. This is really not understandable in 2017 ! I think it comes from the= DoD's Steelman requirements to have the shortest number of ASCII character= s. But that was not their best idea and Ada has now taken the opposite path= in allowing Unicode identifiers.. Regarding arrays I propose the following evolutions : 1. Allow discriminants in array types (if they are not unconstrained array = types). type Matrix (M,N :=C2=A0Positive) is array (1 .. M, 1 .. N) of Long_Float. 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 o= rdinal operator. A(+i) simply means A(A'First +i).=20 This is an elegant and above all retro-compatible way of permitting to star= t every array at zero which is easier in algorithms, cf. Dijkstra (EWD 831 = "Why numbering should start at zero") or Wirth's Oberon. Using A'Range is n= ot possible outside the basic cases. Anytime you want to compute indexes yo= u fall on relative indexes from 0 to N-1 and convoluted expressions that ad= d or suppress A'First. > Also missing is multidimensional array slicing.=20 But above dimension 2 one needs Column Major Order as Fortran or Matlab... = And not Row Major Order as C or Pascal. Otherwise a slice from a 3 dimensi= on arrays is not binary compatible with a 2 dimensions array. This is very= well known but has never been corrected. Hence the problems between LAPACK= and the Ada =C2=ABGeneric_Arrays=C2=BB. > Some will question whether these are appropriate to include in the langua= ge proper and that is a valid > conversation. But it is things like this that will help get Ada away from= the "embedded" stereotype. I totally agree. Regards, Vincent