[plt-scheme] Twitter's experience Ruby -> Scala (dynamic to static typing)

From: Noel Welsh (noelwelsh at gmail.com)
Date: Mon Apr 6 09:24:00 EDT 2009

Given the current push to develop Typed Scheme (and building on
contracts) I thought the following might be interesting:


Key quote:

"Bill Venners: I’m curious, and the Ruby folks will want it spelled
out: Can you elaborate on what you felt the Ruby language lacked in
the area of reliable, high performance code?

Steve Jenson: ... Another thing we really like about Scala is static
typing that’s not painful. Sometimes it would be really nice in Ruby
to say things like, here’s an optional type annotation. This is the
type we really expect to see here. And we find that really useful in
Scala, to be able to specify the type information.


Alex Payne: I’d definitely want to hammer home what Steve said about
typing. As our system has grown, a lot of the logic in our Ruby system
sort of replicates a type system, either in our unit tests or as
validations on models. I think it may just be a property of large
systems in dynamic languages, that eventually you end up rewriting
your own type system, and you sort of do it badly. You’re checking for
null values all over the place. There’s lots of calls to Ruby’s
kind_of? method, which asks, “Is this a kind of User object? Because
that’s what we’re expecting. If we don’t get that, this is going to
explode.” It is a shame to have to write all that when there is a
solution that has existed in the world of programming languages for
decades now."


Posted on the users mailing list.