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,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-17 09:39:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!newsfeed.wxs.nl!transit.news.xs4all.nl!not-for-mail From: Fraser Wilson Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational Date: 17 May 2002 18:41:17 +0200 Organization: XS4ALL Internet BV Sender: fwilson@FWILSON Message-ID: References: <4519e058.0205140718.3ddb1b2a@posting.google.com> <3CE15D0A.3050100@mail.com> <3ce21f37$1@pull.gecm.com> <3CE2AB7E.AD4A9956@san.rr.com> <3CE2B842.7060705@mail.com> <3CE2F4E3.DABF19D7@san.rr.com> <3CE3D578.901D6C43@san.rr.com> <3CE52B0B.C6978AF@san.rr.com> NNTP-Posting-Host: a80-126-24-12.adsl.xs4all.nl X-Trace: news1.xs4all.nl 1021653595 22771 80.126.24.12 (17 May 2002 16:39:55 GMT) X-Complaints-To: abuse@xs4all.nl NNTP-Posting-Date: 17 May 2002 16:39:55 GMT X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:24289 Date: 2002-05-17T16:39:55+00:00 List-Id: Darren New writes: > area=length*length is easy. volume=length*length*length is harder, because > you would need to automatically generate the intermediate type involved in > the volume. I.e., if "area" weren't defined, how would you define operator > "*"(l,r : length)? The short answer is that you make sure you do define area. I restrict new dimensions to a maximum of two base dimensions; though you can have more than one way of constructing them; e.g. Energy in Joules is Force * Length or Power * Time; but you can't say Acceleration is Length / Time / Time, for the reason you mention above. Here's why I love Ada: given definitions for length, area in terms of length and volume in terms of length and area, you can multiply three lengths together and automagically have a volume return type. I suspect that much more of this sort of carrying on will make the compiler run noticeably slower though. Fraser.