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!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: 64-bit unsigned integer? Date: Thu, 1 Mar 2018 16:23:49 -0600 Organization: JSA Research & Innovation Message-ID: References: <421d1598-68d7-4d0b-b596-6e9c59cf865c@googlegroups.com> <877eqxe7u8.fsf@nightsong.com> <87muzsz6s2.fsf@nightsong.com> <628c3bba-6c0d-495b-be2f-e6ed3ef3418f@googlegroups.com> <40f38dfc-d456-4c7c-a65b-8990483af0a3@googlegroups.com> <73e69dd3-3195-48c7-9b9b-f1a4bb7d6fde@googlegroups.com> Injection-Date: Thu, 1 Mar 2018 22:23:49 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="21368"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:50774 Date: 2018-03-01T16:23:49-06:00 List-Id: "Dmitry A. Kazakov" wrote in message news:p79qhc$7vu$1@gioia.aioe.org... ... [Answered based on the most recent thinking, but this is a long way from done. - RLB] > Bounded numbers will be a generic package thus you will not be able to > intermix differently bounded numbers even if they are semantically same. > You will not be able to convert between such types. Directly, definitely true. Indirectly, probably not true. You can always convert to be unbounded integer or to a "machine" integer. > You will have no literals, False: all of these package will have literals (and you will be able to add them to any private type of yours as well). > no universal integer expressions, Universal integer expressions are completely separate from any math issues (since they're evaluated as, well, universal integer expressions). One would hope these would work (if not, it seems that we have something that needs to be fixed). > no way to pass it to a generic numeric package That's an advantage, not a disadvantage. (You always say that you hate generics anyway, why do you care??) Ada doesn't have a universal generic formal numeric type, and that a good thing -- it would be virtually impossible to reason about the semantics of such a type. (Overflow, saturation, or neither? Floating precision/fixed precision/exact results? Etc.) Also, from an implementation perspective, such a thing would make shared generics totally unusable (every operation would have to be done in a thunk, as the various differences noted above could not be reconciled with the usual technique of "use the largest representation"). That makes me against it as it represents an existential threat to Janus/Ada. >, no way to have it as discriminant (large discriminants are useful in some >cases) Thank goodness. The fewer discriminants the better. The same would be true with array indexing (although you could use it as a map key to get a similar effect). Randy.