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 X-Google-Thread: 103376,1dd28d5040ded1f8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-11 07:17:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!ra.nrl.navy.mil!dca6-feed2.news.algx.net!allegiance!newsfeed1.cidera.com!Cidera!news100.world-online.no!news100.world-online.no!nntp.newmedia.no!news.powertech.no!uninett.no!ntnu.no!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Re: Announce: Grace project site operational Date: Sat, 11 May 2002 14:17:19 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: <3CD88FBD.4070706@telepath.com> <3CD91E31.1060004@telepath.com> <3CDBD673.FF452A3D@otelco.net> NNTP-Posting-Host: kiuk0156.chembio.ntnu.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: tyfon.itea.ntnu.no 1021126639 29208 129.241.83.82 (11 May 2002 14:17:19 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Sat, 11 May 2002 14:17:19 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:23899 Date: 2002-05-11T14:17:19+00:00 List-Id: On Fri, 10 May 2002 11:38:14 -0400, Marin David Condic wrote: > Example: There are times when one might want to have unique types for > Volts and Amps and Ohms (reading from different sensors) and there are > times when this would only be extremely painful (when calculating > typical electrical relationships) and what exactly would the type > conversions mean anyway? If I say "Amps := Amps_Type (Volts) / > Amps_Type (Ohms) ;" am I really converting volts to amps and ohms to > amps as it appears? Not exactly as it reads. So there can be an awful > large amount of gray area in deciding when to create types and when > doing so is going to just make things worse. But I can usually spot > "worse" when I see it. :-) I agree. Say you instead defined them as subtypes of Float (for this example) with allowed ranges for each type, would that be an enhancement over only using Float? I'm asking because I can see that you run the risk of getting some constraint errors you have to deal with in your program, but on the other hand the program will tell you when your calcultaions gives very wrong results which may indicate errors in your code. Preben -- �.., chaos is found in greatest abundance wherever order is being sought. It always defeats order, because it is better organized.� -- Interesting Times, Terry Pratchett