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!.POSTED!not-for-mail From: Paul Rubin Newsgroups: comp.lang.ada Subject: Re: SI Units Checked and Unchecked Date: Fri, 10 Aug 2018 21:42:20 -0700 Organization: A noiseless patient Spider Message-ID: <87k1oxfr9v.fsf@nightsong.com> References: <9381f30a-a957-4477-b037-b2d60041e83e@googlegroups.com> <60ddd5ae-57e1-45e8-929c-302fabaa24ef@googlegroups.com> <96424a63-d811-4ade-88db-258f3febe60a@googlegroups.com> <99af08dd-39fb-4c1e-a247-eef9680a2abd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="f31cea886a7d49865f708e61376b3999"; logging-data="15826"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Yz2hx4qAtTOm4IuCGML1Z" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) Cancel-Lock: sha1:sJw8LrZPNT2xX8wwL3d/5+Ceqh8= sha1:s7jtkz1awlc1TlApHzo6xx95P7g= Xref: reader02.eternal-september.org comp.lang.ada:54137 Date: 2018-08-10T21:42:20-07:00 List-Id: "Dmitry A. Kazakov" writes: > No language change can make dynamic cases static. I think the idea is to allow constraints on generic instantiation precise enough to use them for unit checking. It looks like they added a watered-down version of concepts and constraints to C++20: https://en.cppreference.com/w/cpp/language/constraints This kind of thing can be done more fundamentally in dependently typed languages, but I get the impression that it's still an impractical academic exercise.