[racket-dev] What are single flonums good for?

From: Vincent St-Amour (stamourv at ccs.neu.edu)
Date: Mon Sep 17 14:04:07 EDT 2012

At Sun, 16 Sep 2012 17:10:01 -0500,
Matthias Felleisen wrote:
> Suppose we had started Racket long ago and maintained it until
> now. Then we'd be looking at 8bit, 16, 32, and 64 precision. In some N
> years from now, we may need 128. (Actually there were machines in the
> past that did, but never mind.)
> 
> Could we separate precision and type into separate dimensions so that
> we could state types like this:
> 
>   ∀ p : precision. FP[p] -> FP[p] 
> 
> where we see FP as a type constructor that consumes a precision value
> to generate the right kind of type. This might be a dependent type but
> it could be a useful one. Of course, it isn't really a parametric form
> of polymorphism as Neil's functions show (and better still Vincent's
> rewrites).

I think row types can give us that, and clean up other parts of the
numeric tower, too. That's something we've been thinking about for some
time.

Vincent


Posted on the dev mailing list.