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,fd63afa4dc364b7e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-26 18:40:05 PST Path: supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.cwix.com!skin02.micron.net!news03.micron.net.POSTED!not-for-mail Message-ID: <3ABFFD67.6EBDA7B@votehere.net> From: Andrew Berg X-Mailer: Mozilla 4.76 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Static typing (Was Re: Better support for garbage collection) References: <98m938$2iod0$1@ID-25716.news.dfncis.de><98pgs1$32up7$1@ID-25716.news.dfncis.de><98umc6$39coj$1@ID-25716.news.dfncis.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 26 Mar 2001 18:39:35 -0800 NNTP-Posting-Host: 209.203.248.8 X-Trace: news03.micron.net 985660748 209.203.248.8 (Mon, 26 Mar 2001 19:39:08 MST) NNTP-Posting-Date: Mon, 26 Mar 2001 19:39:08 MST Xref: supernews.google.com comp.lang.ada:6096 Date: 2001-03-26T18:39:35-08:00 List-Id: Ken Garlington wrote: > > "Robert A Duff" wrote in message > news:wccelvrp7xk.fsf@world.std.com... > : "Ken Garlington" writes: > : > : > Can't see why, since the terms "rational number" and "floating-point > number" > : > are not the same. I think I'd be much more bothered by a floating-point > : > number without a (floating) point! > : > : Well, as it happens, "one half" is both a rational and (on most > : machines) a floating point number. Not to mention a fixed point > : number. ;-) > > Actually, I think "one half" is a string. :) > > More generally, of course, there are rational numbers that are not exactly > representable as floating point numbers, so I don't see why a compiler > should accept x/y as a floating-point literal. Okay, but then by that argument there are some decimal numbers that are not exactly representable as floting point numbers, so I don't see why a compiler should accept 0.1 as a floating-point literal. After all, all 0.1 is is a silly way to write 1/10. I'd myself like better support for dealing with rational bignums, but that's a different thing entirely. And with enough time and operator overloading probably would not require tons of compiler support, unless we want them to be reasonably fast. :( -andrew