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 X-Received: by 2002:a5e:8e42:: with SMTP id r2-v6mr3125615ioo.134.1533920646760; Fri, 10 Aug 2018 10:04:06 -0700 (PDT) X-Received: by 2002:aca:c6ca:: with SMTP id w193-v6mr221252oif.1.1533920646631; Fri, 10 Aug 2018 10:04:06 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!g13-v6no799368itf.0!news-out.google.com!g5-v6ni650iti.0!nntp.google.com!g24-v6no792164iti.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 10 Aug 2018 10:04:06 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=47.185.195.62; posting-account=zwxLlwoAAAChLBU7oraRzNDnqQYkYbpo NNTP-Posting-Host: 47.185.195.62 References: <9381f30a-a957-4477-b037-b2d60041e83e@googlegroups.com> <60ddd5ae-57e1-45e8-929c-302fabaa24ef@googlegroups.com> <96424a63-d811-4ade-88db-258f3febe60a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <99af08dd-39fb-4c1e-a247-eef9680a2abd@googlegroups.com> Subject: Re: SI Units Checked and Unchecked From: "Dan'l Miller" Injection-Date: Fri, 10 Aug 2018 17:04:06 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Original-Bytes: 3194 Xref: reader02.eternal-september.org comp.lang.ada:54129 Date: 2018-08-10T10:04:06-07:00 List-Id: On Friday, August 10, 2018 at 9:50:53 AM UTC-5, Dmitry A. Kazakov wrote: > On 2018-08-10 15:59, Dan'l Miller wrote: > > On Friday, August 10, 2018 at 1:45:47 AM UTC-5, Dmitry A. Kazakov wrote= : > >> On 2018-08-10 00:12, Dan'l Miller wrote: > >> > >>> Actually, I am talking about compile-time checks within Ada source co= de for a gauge as would be > >>> utilized on the GUI control screen of a chemical plant or a nuclear r= eactor, not some toy string > >>> processing app that is the analogue of GNU Units. > >> > >> As I explained this design is technically not viable. > >=20 > > in today's Ada. >=20 > =E2=80=A6 Either way, classes of dimensioned object built as subtypes=20 > with the unit being a constraint or as related types with the unit being= =20 > the type tag, most designs will use subtype- or class-wide objects. >=20 > We need a type system capable of static checks when constraints or tags= =20 > are statically known, a way to convert "Unit_Error may be raised" into=20 > hard type error. Well, now there is something that we can agree on. > Then we will have both static checks and zero run-time overhead in=20 > static cases and fallback to dynamic checks in class-wide cases. I take it =E2=80=A6 > In any Ada. =E2=80=A6 that you don't think that =E2=80=9CThen we =E2=80=A6 class-wide c= ases=E2=80=9D sentence is achievable at all in any derivative of Ada due to= some fundamental flaw in Ada, and that a significantly not-Ada language is= the only hope of achieving that sentence. Why so?