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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cc4f25d878383cc X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-12-10 09:21:35 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!paloalto-snf1.gtei.net!crtntx1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!bos-service1.ext.raytheon.com!bos-service2.ext.raytheon.com.POSTED!not-for-mail Message-ID: <3C14EF19.76C85864@sparc01.ftw.rsc.raytheon.com> From: Wes Groleau Reply-To: wwgrol@sparc01.ftw.rsc.raytheon.com X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en,es-MX,es,pt,fr-CA,fr MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Dimensionality Checking (Ada 20XX) References: <11bf7180.0112070815.2625851b@posting.google.com> <9v0crt$bo2bi$1@ID-25716.news.dfncis.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 10 Dec 2001 12:21:29 -0500 NNTP-Posting-Host: 151.168.144.162 X-Complaints-To: news@ext.ray.com X-Trace: bos-service2.ext.raytheon.com 1008004894 151.168.144.162 (Mon, 10 Dec 2001 12:21:34 EST) NNTP-Posting-Date: Mon, 10 Dec 2001 12:21:34 EST Organization: Raytheon Company Xref: archiver1.google.com comp.lang.ada:17692 Date: 2001-12-10T12:21:29-05:00 List-Id: Mark Lundquist wrote: > > I don't believe unit specification (and therefore dimension checking) is > > applicable to floating-point types. > > Why in the world not? Yeah, why not? > 2) There's a bad problem with generics. Unit-safe programming totally > destroys the generic contract model. For example... given this: > > generic > type T is digits <>; > function F (X, Y : T) return T; > > How can you tell if this is legal?: I've seen generics that were legal (in the sense of compiling) but where the compiler was capable of rejecting particular instantiations. I've also seen instantiations where the illegality was detected at run-time. My memory is fuzzy on the details, though. -- Wes Groleau http://freepages.rootsweb.com/~wgroleau