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-15 16:52:46 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!newsfeed1.cidera.com!Cidera!cyclone.socal.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3CE2F4E3.DABF19D7@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational 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> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Wed, 15 May 2002 23:52:45 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1021506765 66.75.151.160 (Wed, 15 May 2002 16:52:45 PDT) NNTP-Posting-Date: Wed, 15 May 2002 16:52:45 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:24136 Date: 2002-05-15T23:52:45+00:00 List-Id: Hyman Rosen wrote: > > Darren New wrote: > > Can someone explain why a combinatoric explosion of types is bad > > Several reasons. First of all, someone has to write them. Second, > the set of possible units is infinite, so declaring all of the > types and operations is impossible; you can only declare the > subset that you think anyone will ever need, and if you're wrong, > the extra ones will have to be done by the users. Third, it feels > inelegant to have to do this - in the real world, units systems > such as SI consist only of a small number of fundamental units > and all the rest are composed of those. One would hope that this > could be captured by the programming. Well, it does just seem to me pretty trivial to write a program that takes something like =distance =time velocity=distance/time area=distance*distance volume=distance*distance*distance and turn such a file into the appropriate set of Ada type and function declarations, whether it's 50 lines or 5000 lines, that when "with"ed and "used" could make for safe unit conversions. You need another unit? Add it to the file and regenerate the Ada. I mean, basically, isn't this what the C++ compiler is doing with the templates, except only creating those combinations you use? Of course, it could be made much more sophisticated too. Or don't Ada people do things like that? :-) -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://home.san.rr.com/dnew/DNResume.html ** ** http://images.fbrtech.com/dnew/ ** My brain needs a "back" button so I can remember where I left my coffee mug.