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.50.66.193 with SMTP id h1mr1480630igt.3.1435060272673; Tue, 23 Jun 2015 04:51:12 -0700 (PDT) X-Received: by 10.140.99.44 with SMTP id p41mr154470qge.3.1435060272528; Tue, 23 Jun 2015 04:51:12 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!j8no434289igd.0!news-out.google.com!4ni2534qgh.1!nntp.google.com!z60no2832757qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 23 Jun 2015 04:51:12 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=185.30.133.97; posting-account=hya6vwoAAADTA0O27Aq3u6Su3lQKpSMz NNTP-Posting-Host: 185.30.133.97 References: <4lrj5zz2u2z.u8x9cf7xzic6.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <49c10d77-f026-48ec-9339-e47ea94ac66a@googlegroups.com> Subject: Re: Ada design bug or GNAT bug? From: vincent.diemunsch@gmail.com Injection-Date: Tue, 23 Jun 2015 11:51:12 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26423 Date: 2015-06-23T04:51:12-07:00 List-Id: Le lundi 22 juin 2015 20:27:17 UTC+2, Shark8 a =E9crit=A0: > * Ada95's modular types combine the orthogonal idea of a cyclic numeric t= ype and an unsigned type -- conceptually it could have been better to separ= ate the two. Could you tell us a bit more on that ? Why would it be better to separate U= nsigned Integer and modular types ? I had the impression that a compiler co= uld use a unsigned integer representation for such integer declaration : type Unsigned is range 0 .. 2**32 -1; Since converting to a Standard.Integer requires anyway to use an explicit conversion in the Ada language because of strong typing, not mentionning ru= n-time tests on range, I thought it would be easy for the compiler to inser= t conversion between signed and unsigned. But it seems that Ada implementations prefer to use=20 type Unsigned is mod 2**32; But what is the problem with this ? Detection of overflow ? > * The lack of a "abstract type" that could be used to unify (e.g.) [[Wide= _[Wide_]]String into a single "generic"/abstract type; ditto on Character. Same question : what would be your proposal ?