Skip to content
June 26, 2007 / cdsmith

What To Know Before Debating About Type Systems

I started writing this as a blog entry, but it reached 15 pages.  So it moved to a place of its own.

I’ve tried to be reasonably fair.  Enjoy!


Leave a Comment
  1. Jedaï / Jul 4 2007 2:57 pm

    That looked like it could be very interesting. Sadly the link is broken, could you please put your document online again ?


  2. cdsmith / Jul 4 2007 3:20 pm

    The document is still there, and the link works from where I am. Perhaps the system was just temporarily down or there was a router issue? Let me know if you can try again and reach it.

  3. Anonymous / Aug 14 2007 1:21 am


    You don’t have permission to access /types.html on this server.

  4. cdsmith / Aug 14 2007 10:32 am

    Thanks for pointing that out. My web host somehow managed to go in and screw up all the permissions on files! Fixed now.

  5. Johann Thomas / Jun 18 2008 2:18 am

    Well, the page is gone. Please publish it again. It is linked to from many places.


  6. Dmitry Astapov / Jun 18 2009 12:17 pm could not be found :(

    Could you please publish it again?

  7. Anonymous / Oct 17 2009 11:48 am
  8. paulbutcher / Jun 15 2010 4:05 am


    The link seems to be dead at the moment (the domain appears to have expired).

    I would be very grateful indeed if you could ensure that it remains available (at its original location or elsewhere). It’s comfortably the best framing of the debate that I’ve seen, and I would greatly miss it (as, I suspect, would many others).

    Thanks in advance!


  9. Jeremy Holman / Jul 16 2010 6:27 pm

    This article, which I agree is excellent in its content, is apparently very unstable on the internet. It’s currently 404ing at (although itself is apparently up), and the entire site is down.

    Chris Smith, your adoring fans wish you’d put your damn excellent article in a more reliable place! :P We want to tell people to STFU and RTFM, and then link to you!

    For those reaching this page, here’s one way to read the article:

  10. ianam / Jan 2 2011 6:53 pm

    You really should stick with the practical stuff, because you get all the theoretical stuff wrong. For instance, Rice’s Theorem doesn’t say that you can’t check a program for correctness, it says that no single algorithm can infallibly determine the correctness of *every* program; but many specific programs can be proven correct or incorrect. And of course there *are* type checkers that don’t reject any correct programs — unless you have a bizarre notion of correctness by which syntactically invalid programs are deemed “correct”. Even then, if all operations on all types are defined, the type checker will have no opportunity to reject the program. For example, consider a system in which any value is implicitly converted to its string representation if no other operation applies — i.e., if otherwise the type checker would reject the program. There’s no “ironclad mathematical proof” that “it’s impossible” to build such a system; it’s readily realizable.

    • cdsmith / Jan 2 2011 7:09 pm

      Ignoring the insulting tone, I’ll answer what you said.

      If I understand what you’re saying about Rice’s Theorem, then you are correct. This seems to be a question of definitions, and I’m reading the original text that I wrote several years ago and having a hard time seeing how it could be misinterpreted in that way. After all, I did say “There will be some programs for which the answer is easy; … However, there will be some complicated programs for which my program can never figure out the answer.” I then went on to write in great detail about approximations that give bounds on the answer but never quite completely determine the answer. So we seem to have no actual disagreement here.

      As for the latter part, it is a fact that no type checker can determine any non-trivial proposition about the output (or visible behavior) of a program. Okay, I’m guessing that somewhere perhaps I forgot to repeat the “non-trivial” condition, since your counterexample is to point out the trivial type checker that rejects no programs at all. If this actually, confused you, let me apologize and assure you that you’re right, you can indeed write a type checker that always accepts (or always rejects) a program regardless of its content. Outside of those two cases, what I said is true.

      If you’re thinking of syntax checking, that’s changing the question. Syntax isn’t a question of the behavior of the program; it’s a question of whether you’ve got a program at all. You’d have a hard time convincing many people that a piece of text that gives syntax errors if you try to compile it is reasonably described as a program.

  11. Anonymous / Jan 3 2011 3:37 am

    The links to this article (except for the Wayback machine archive) are long since dead. It’s a good article–could you submit it to a journal so it can then be cited properly? Preferably one that is hosted online, of course.

    • cdsmith / Jan 9 2011 10:11 pm

      If it helps, I’ll grab the text and re-post it as a blog entry here, where it’s likely to be available for longer. As for a journal, umm, it’s pretty far away from journal-quality work. It’s just a light commentary on some very general ideas. I do mathematics research and publish in journals for a living, and trust me, there’s a huge chasm between the two.

      • Anonymous / Aug 23 2011 10:58 am

        I think it would be fine for a publication like The Monad Reader. Maybe you could send it there.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: