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: Wed, 28 Feb 2018 17:20:58 -0600 Organization: JSA Research & Innovation Message-ID: References: <421d1598-68d7-4d0b-b596-6e9c59cf865c@googlegroups.com> <877eqxe7u8.fsf@nightsong.com> Injection-Date: Wed, 28 Feb 2018 23:20:58 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="18648"; 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; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:50724 Date: 2018-02-28T17:20:58-06:00 List-Id: "Paul Rubin" wrote in message news:877eqxe7u8.fsf@nightsong.com... > "Randy Brukardt" writes: >> The problem is simply one of language definition; there is no way in >> the Ada language to get overflow for an unsigned type... These days, >> we're moving away from adding any more kinds of types; everything new >> will be a library much like the containers > > That seems unfortunate. I hope the libraries can be implemented in a > way that don't cause runtime overhead. I don't see any reason why not. Just because something is in a library doesn't prevent it from using inlining, which then opens the door to all of the "normal" optimizations. One of the main reason for the change to libraries is that we have a number of requests to add additional numeric functionality (unlimited-size integers ["bignum"], saturation math) and dealing with all of those with dedicated types would add a load of built-in stuff and complications. (It also would make generic sharing much harder, possibly impossible, depending on the rules adopted.) Libraries pretty much avoid all of that, and can be implemented as well (or poorly) as makes sense for an Ada vendor (meaning that they don't have to expend much in the way of resources on features not of interest to their customers). Randy.