Hacker News new | ask | show | jobs
by takikawa 4895 days ago
> Now, admittedly, not all the productivity gain is from types. However, they certainly help me, not just in making the code robust but also in writing it in the first place. And typeclasses actually do make the language concretely more expressive in certain ways.

You said you started out in Racket. Did you try Typed Racket? You don't necessarily need to move to Haskell to get a type system (though you won't get typeclasses).

1 comments

I looked at it, but never used it. I certainly like the core idea and it would probably have been better for me than just using plain Racket. However, moving over to it--and getting other people to use it--would not have been that much easier than moving to Haskell.

I was missing some specific type features: algebraic data types with pattern matching and custom numeric types (I needed 18-bit unsigned ints, of all things). I don't think Racket supports either of these. The numeric types, I suppose, are just a special case of wanting typeclasses. I really like typeclasses :P.

Additionally, I had several non-type-related reasons to move to Haskell: laziness, purity (my teammates decided that global variables and having IO everywhere are fun) and more functional data structures (vectors in particular).