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.224.172.2 with SMTP id j2mr25190078qaz.3.1412192894148; Wed, 01 Oct 2014 12:48:14 -0700 (PDT) X-Received: by 10.140.95.199 with SMTP id i65mr26877qge.19.1412192894122; Wed, 01 Oct 2014 12:48:14 -0700 (PDT) Path: border1.nntp.dca1.giganews.com!nntp.giganews.com!dc16no285158qab.1!news-out.google.com!i10ni60qaf.0!nntp.google.com!s7no166371qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 1 Oct 2014 12:48:13 -0700 (PDT) In-Reply-To: <86b50b2e-57ad-47f3-bdaf-b98abcb722be@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=87.91.37.131; posting-account=hya6vwoAAADTA0O27Aq3u6Su3lQKpSMz NNTP-Posting-Host: 87.91.37.131 References: <7ab81f91-af1f-4fb1-8aef-c7f692e22f38@googlegroups.com> <72db10f1-7e12-4f8c-8ee5-c2bdce727c09@googlegroups.com> <34da5a39-9fa3-4e8e-a3f9-98f61a4ebcc7@googlegroups.com> <1vtp35phxa6d9$.ni9xlewi7r5v.dlg@40tude.net> <86b50b2e-57ad-47f3-bdaf-b98abcb722be@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9ae867ea-50da-40ef-bd56-3d6dd62d34e6@googlegroups.com> Subject: Re: Integers and Mathematical Correctness From: vincent.diemunsch@gmail.com Injection-Date: Wed, 01 Oct 2014 19:48:14 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:189290 Date: 2014-10-01T12:48:13-07:00 List-Id: > There's no relation. The post from Vincent that started this said "I thi= ng [sic] there are two problems with the current Ada implementation :", and= then he described two separate problems, one dealing with modular types an= d one dealing with rational numbers. (It's just a coincidence that both in= volved division, I think.) >=20 >=20 >=20 > -- Adam No, there is no coincidence : I am disappointed that Ada uses "/" as an int= eger division operator.=20 I understand the reasons that dated back from Ada 83 : direct hardware inst= ruction mapping, difference with the "mathematical" "div" operator on negat= ive numbers and the relation -5 / 4 =3D 5 / -4.=20 (Even if you call me a charlatan, I still maintain that Euclid was right : = imagine that 3 friends need to pay a bill (which means that they have a neg= ative amount of money) the only way to share is rounding toward -Infinity = :-) )). But now that we have operator overloading and that I use it for rationals o= r symbolic expression, I am bothered that an integer division has exactly t= he syntax I would like to use for a rational number... And this gives rise to a deeper question : should the revision of the Ada l= angage be used to improve the langage (make it better) sometimes with the s= ame core functionality, or should it be intended only for adding new featur= es keeping backward compatibility ? The response is not obvious for me, sin= ce the only motivation I have to use Ada is that it is a "better" (cleaner,= easier to use, to read, to understand) langage than=A0C. Kind regards, Vincent