[racket] Typed Racket vs. Haskell

From: John Clements (clements at brinckerhoff.org)
Date: Tue Sep 18 12:55:36 EDT 2012

On Sep 18, 2012, at 8:30 AM, thorsopia at lavabit.com wrote:

> Hi,
> 
> I'm a beginner, but I have some experience with Scheme and Haskell.
> 
> Haskell is famous for its strict type system. Is it possible to achieve
> this in a Lisp-like language? Is Typed Racket as strict as Haskell?
> 
> I'd like to see a comparison between the two.

Both Haskell and Typed Racket come from the Programming Languages community, and their type systems both arise from the same chain of research. They are both "type safe" systems (unlike, say, C), in that they produce proofs that some set of "bad things" can't happen.

With that said, Haskell and Typed Racket represent two different "attitudes" within that design space: Haskell takes the attitude that the type system is a fundamental part of the program design, and typed Racket takes the attitude that the program comes first, and the type system's job is to check that nothing is going to go wrong.

At a jargon level, you could say that Haskell has a Hindley-Milner type system, and that Racket uses "occurrence typing", if that's at all helpful.

When comparing type systems, it's extremely important to qualify opinions: the above two paragraphs (especially the first) are my opinion only.

John Clements


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4800 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20120918/ca71adf9/attachment-0001.p7s>

Posted on the users mailing list.