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=0.6 required=5.0 tests=BAYES_00,FROM_WORDY autolearn=no 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-25 08:24:04 PST Path: supernews.google.com!sn-xit-03!supernews.com!newsfeed.wirehub.nl!news.stealth.net!207.115.63.142.MISMATCH!newscon02.news.prodigy.com!newscon06.news.prodigy.com!prodigy.com!newsmst01!postmaster.news.prodigy.com!newssvr16.news.prodigy.com.POSTED!not-for-mail From: "Ken Garlington" Newsgroups: comp.lang.ada 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> Subject: Re: Static typing (Was Re: Better support for garbage collection) Organization: ex-FlashNet, now Prodigy X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: NNTP-Posting-Host: 65.65.211.16 X-Complaints-To: abuse@prodigy.net X-Trace: newssvr16.news.prodigy.com 985537271 6207069 65.65.211.16 (Sun, 25 Mar 2001 11:21:11 EST) NNTP-Posting-Date: Sun, 25 Mar 2001 11:21:11 EST Date: Sun, 25 Mar 2001 16:21:11 GMT Xref: supernews.google.com comp.lang.ada:6036 Date: 2001-03-25T16:21:11+00:00 List-Id: "Robert A Duff" wrote in message news:wccofutg3ku.fsf@world.std.com... : "Ken Garlington" writes: : : > 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. : : You misunderstand my point. No, I just disagree with it. : Of course x/y is not a literal. : My claim is that you shouldn't have to write ".0" on a floating point : literal that happens to be an integer. That is, : : X: Float := 0; : Y: Float := 1/2; : : should be legal. But if 1/2 is not a literal, then what is it? CW would say that it is a division operation involving two integers; why should the result be a floating-point number? If we are to have implicit casts of integers to floating point values, why not then permit the more general: Y : Float := ferble; where "ferble" is a function that returns an integer (or, for that matter, any fixed-point) type? For that matter, why not Y : Float := "one half"; as you suggested (unintentionally) in a separate post? In general, I'm not a fan of DWIM compilers (PL/M being a favorite example of mine). : : - Bob