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-16 08:50:59 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!Cidera!cyclone.columbus.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3CE3D578.901D6C43@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> <3CE2F4E3.DABF19D7@san.rr.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 16 May 2002 15:50:58 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1021564258 66.75.151.160 (Thu, 16 May 2002 08:50:58 PDT) NNTP-Posting-Date: Thu, 16 May 2002 08:50:58 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:24207 Date: 2002-05-16T15:50:58+00:00 List-Id: Stephen Leake wrote: > > Darren New writes: > > > 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. > > I agree, it could be done. Please do it! I don't think I know Ada well enough, actually. There's probably all kinds of subtleties I'd miss in what's needed. Maybe if nobody does it by the time I'm done my current contract work, I'll take a shot at it. I'll bring it up again when I'm free and ask for suggestions. > > except only creating those combinations you use? > > I think this is critical. In a complex system, the Ada code you > generate will be huge, and could have an impact on compilation time. Fair enough. It would seem odd to me that a template (which you're basically going to recompile every time you compile any C++ code, isn't that how it works?) is going to compile faster than simply "with"ing something you've already compiled. Of course, if you add a unit, then you're going to wind up recompiling a bunch of Ada stuff you probably don't really need to compile. So it's not obvious to me at least that on average it's such a loss. I would certainly think a sufficiently sophisticated compiler *could* eliminate all the overhead in the final code. Indeed, I could imagine a tool that builds two bodies, one where all the units are properly organized, and another where they're all the same type. > I guess if I had the 'Auto_Unit_Package', I might skip the Macsyma > step for more programs. Hmm. Sure. It might not be appropriate for really big programs, but if the point of Grace is to make simple packages to get people more interested in the power of Ada, a units package like this could be good. > > Of course, it could be made much more sophisticated too. > In what way? Adding scaling, like "kilo" and "centi" and such, just as an example. Dealing with things like "area=length*length*length" as another example. > > Or don't Ada people do things like that? :-) > Well, I have done something sort of like that, with Auto_Text_IO > Also, I believe parts of the GNAT compiler are tool-generated. And much of the GUI work is code-generated, isn't it? (As you can tell, I haven't used Ada enough to have done any largish program in it. :-) -- 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.