[racket-dev] flonum vs. inexact-real

From: Sam Tobin-Hochstadt (samth at ccs.neu.edu)
Date: Sun Oct 3 20:56:29 EDT 2010

On Sun, Oct 3, 2010 at 7:48 PM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>
>> I worry that this is a hazard for existing code.  For example, this
>> plain Racket code:
>> [snip]
>
> I imagined that there would be some time between introducing `flonum?'
> and enabling 32-bit floats. During that in-between time, both `flonum?'
> and `inexact-real?' would be ok in practice, but code should migrate to
> `flonum?'.

Ah, that makes sense.

>> Similarly (but less bad), this Typed Racket code:
>> [snip]
>> which currently typechecks would now be a type error.
>
> I didn't really consider the transition for Typed Racket. Would a grace
> period similar to the dynamic case be possible and worthwhile (where
> `inexact-real?' is treated like `flonum?' for a while longer, but
> `flonum?' also becomes available)?

Yes, that would well for Typed Racket.
-- 
sam th
samth at ccs.neu.edu


Posted on the dev mailing list.