[racket-dev] a small Racket success story

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Tue Aug 17 21:21:43 EDT 2010

As some of you know, we're building a semantics for Python in Racket.
At my instigation, my students are doing everything in Typed Racket.
However, when we got to generators, we ran up against a problem: we
couldn't type the generator code (a bad interaction between mutation
and occurrence typing).  My students tried a few different things,
none of which worked, and got stalled for a few days.

But hey, this is Racket!  So in an hour I'd rewritten the generator
abstraction in untyped Racket, exported it, imported it with a typed
interface, and we were back in action.  See, it's not the interface
that couldn't be expressed: it was the implementation that couldn't be
checked.  Most type languages conflate the two issues.

Moral: If you want a language to model complex systems (and what's
more complex than Python?), you need flexibility.  And Racket is
nothing if not catholic.


Posted on the dev mailing list.