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,a5f77772dc1375a3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-22 15:44:16 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!nntp.abs.net!news-xfer.newsread.com!netaxs.com!newsread.com!POSTED.newshog.newsread.com!not-for-mail From: William C. Brennan MIME-Version: 1.0 User-Agent: Hogwasher/2.6.1 (Macintosh) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <01HW.B91197820000C3D90E449050@netnews.netaxs.com> Subject: Re: Safe Units Handling in Ada Newsgroups: comp.lang.ada References: <3CEB7124.4050604@blancolioni.org> Date: Wed, 22 May 2002 22:44:13 GMT NNTP-Posting-Host: 207.106.60.151 X-Complaints-To: Abuse Role , We Care X-Trace: newshog.newsread.com 1022107453 207.106.60.151 (Wed, 22 May 2002 18:44:13 EDT) NNTP-Posting-Date: Wed, 22 May 2002 18:44:13 EDT Organization: NetAXS, LLC (netnews.netaxs.com) Xref: archiver1.google.com comp.lang.ada:24549 Date: 2002-05-22T22:44:13+00:00 List-Id: On Wed, 22 May 2002 6:21:24 -0400, Fraser wrote (in message <3CEB7124.4050604@blancolioni.org>): > Fraser Wilson wrote: >> After a recent discussion, I put together Macks, a small program that >> generates Ada packages for dealing with physical units in a type safe >> way. > This units-generator package looks terrific. I've been doing this stuff by hand for too long. Just one comment... The generated example.ads yields: ... function "*" (Left : Kilogram; Right : Kilogram) -- This is good, we want it abstract. return Kilogram is abstract; function "/" (Left : Kilogram; -- We want this one abstract too. Right : Kilogram) return Kilogram is abstract; Wouldn't it be also useful to define the operator: function "/" (Left : Kilogram; Right : Kilogram) return Float_Type; (where Float_Type is used throughout as a unitless scalar)? -- Bill Brennan brennan@netaxs.com