[racket-dev] Typed units?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Oct 8 12:56:33 EDT 2012

I think that this is an absolutely wonderful application of units. 

The good news is that we always published about units as if they were typed. After all we tried to improve on functors. 

The bad news is that we do not have an implementation of the type system yet. BUT, this topic is on Asumu's landscape that I painted for his dissertation. Don't hold your breath though when you come here for RacketCon, let's sketch out this case study for Asumu, Vincent, and Sam (and me). 

-- Matthias

On Oct 8, 2012, at 12:42 PM, Neil Toronto wrote:

> I currently have a function
>  array-fft : (Array Complex) -> (Array Float-Complex)
> courtesy Robby and James. I'd also eventually like
>  bfarray-fft : (Array Bigfloat-Complex) -> (Array Bigfloat-Complex)
> and others, corresponding to different kinds and precisions of numbers.
> It would also be nice to allow the matrix operations to work on Bigfloat and other kinds of numbers; currently, they're limited to Number. More generally, it would be nice to make all the algorithms in the math library generic.
> One obvious approach is to use units, and provide the units and some implementations that are already wired up. Is this fundamentally hard to do in Typed Racket, easy but nobody had a reason yet, or somewhere in between?
> Generics is another option, but it seems they'd be harder to implement in TR because dispatch is done at runtime.
> Neil ⊥
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev

Posted on the dev mailing list.