Hm, I was expecting this to at least mention that exceptions in Haskell pure code is imprecise, and you can only guarantee the exception you desire by throwing it in the IO monad.
Although I'm not sure what the point is in the article: yes, if you write a purposefully flawed instance of Typeable, you will get errors when you try to use it. I'm not convinced that this is a demonstration that it is "unsafe", since the flawed Typeable instance seems to cause errors in the code that uses the flawed Typeable instance, and not in other parts of the code.
> yes, if you write a purposefully flawed instance of Typeable, you will get errors when you try to use it.
And if you write flawed C, you will also get errors when you try to use it... but I don't think that will get many heads nodding in the camp of static typing zealots.
> And if you write flawed C, you will also get errors when you try to use it..
Errors potentially in completely unrelated parts of the code. Or worse, no detectible errors at all, just silent corruption of data. You parent comment was trying to make this distinction I think, note the emphasis on "code that uses it" in the comment you're replying to.
The idea that static typing is better than any other tool for preventing bugs is a contentious dogma, not essentially different from iPhone vs. Android flame wars - just more intellectualized.
Don't flatter yourself that your position on a matter of hotly-argued opinion is technical and that other positions are not technical.
http://research.microsoft.com/en-us/um/people/simonpj/papers...
Although I'm not sure what the point is in the article: yes, if you write a purposefully flawed instance of Typeable, you will get errors when you try to use it. I'm not convinced that this is a demonstration that it is "unsafe", since the flawed Typeable instance seems to cause errors in the code that uses the flawed Typeable instance, and not in other parts of the code.