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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3885b7fd66a1db28 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-13 15:20:20 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: kcline17@hotmail.com (Kevin Cline) Newsgroups: comp.lang.ada Subject: Re: Dimension checking was RE: Why is Ada NOT a good choice for a beginner to programming? Date: 13 Jan 2003 15:20:20 -0800 Organization: http://groups.google.com/ Message-ID: References: NNTP-Posting-Host: 192.76.54.20 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1042500020 28438 127.0.0.1 (13 Jan 2003 23:20:20 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 13 Jan 2003 23:20:20 GMT Xref: archiver1.google.com comp.lang.ada:32981 Date: 2003-01-13T23:20:20+00:00 List-Id: "Robert C. Leif" wrote in message news:... > An obvious fix, which was discussed at SIGAda 2002, is to develop a > means > (Pragma?) to tell the compiler to only check the dimensionality at > compile > time. This could be in the form of a compile time assertion. > Bob Leif I don't know what the proposal encompassed, but it's hard for me to imagine an "obvious" fix to this problem. With physical dimensions we have Qty * Qty => Qty where L1,M1,T1,L2,M2,T2 are the dimensions of length, mass, time, etc. However, there are many systems of physical units in use in different problem domains. For example, it is often convenient to make length and time interchangable. And in matrix algebra we have: innerProduct(Matrix, Matrix) => Matrix Any solution adopted should be able to correctly model both of these type systems.