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=ham 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-04 10:03:40 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.cwix.com!news.binc.net!kilgallen From: Kilgallen@SpamCop.net (Larry Kilgallen) Newsgroups: comp.lang.ada Subject: Re: Another Idea for Ada 20XX Date: 4 Dec 2001 11:48:53 -0600 Organization: LJK Software Message-ID: References: <3C0AACCE.329CFB60@worldnet.att.net> <45601fc.0112031740.3e217c8a@posting.google.com> <3C0CF4E3.A53D20A7@sparc01.ftw.rsc.raytheon.com> NNTP-Posting-Host: eisner.encompasserve.org X-Trace: grandcanyon.binc.net 1007488135 1918 192.135.80.34 (4 Dec 2001 17:48:55 GMT) X-Complaints-To: abuse@binc.net NNTP-Posting-Date: Tue, 4 Dec 2001 17:48:55 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:17391 Date: 2001-12-04T11:48:53-06:00 List-Id: In article <3C0CF4E3.A53D20A7@sparc01.ftw.rsc.raytheon.com>, Wes Groleau writes: > > > Larry Kilgallen wrote: >> If they simply used common type declarations, a lot of errors would >> be detected. If Meters is a new type and is used throughout, and >> Feet is another new type, it becomes difficult to add them. > > But that's not enough to prevent 2 Meters * 2 Meters = 4 Meters True. > nor to allow 10 minutes * 5 KPH = 833 Meters Are you saying that multiplying two different types (not subtypes of the same type) works in Ada95 ? My experience is mostly Ada83. And exactly how would it decide that the resulting type is Meters ? Obviously one could use conversion and unchecked conversion, but those are supposed to be used with caution and serve as a red flag in formal inspection.