| Deutsch English Français Italiano |
|
<vsqp3u$1p809$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> Newsgroups: comp.lang.ada Subject: Re: Dimensional Analysis Date: Sat, 5 Apr 2025 10:20:14 +0200 Organization: A noiseless patient Spider Lines: 20 Message-ID: <vsqp3u$1p809$1@dont-email.me> References: <vsqleu$1ktm5$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 05 Apr 2025 10:20:15 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8680b03d41551e2fc04d8cd8c12ee83a"; logging-data="1875977"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19TD/fNIKSPl4otcU5NnnmQAgyW+teggsg=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:kxyIpQeg0g8YCYa9Z34rLexRhMQ= Content-Language: en-US In-Reply-To: <vsqleu$1ktm5$1@dont-email.me> Bytes: 1685 On 2025-04-05 09:17, Lawrence D'Oliveiro wrote: > So what do you think of this idea? Is it already in use in a > significant way in any Ada code? I figured if any language would be > looking at new ways of writing safer code, it would be the Ada crowd. > ;) Static dimensionality checks are implemented by the GNAT compiler, see https://gcc.gnu.org/onlinedocs/gnat_ugn/Performing-Dimensionality-Analysis-in-GNAT.html For engineering purposes static checks are worthless. So in practice constrained types and dynamic checks are used instead. See https://www.dmitry-kazakov.de/ada/units.htm -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de