So I'm curious, can you point to known problems with Haskell or ML that do not involve using the unsafe features? Scala has problems even without resorting to "unsafe" features like casting or native methods.
GHC 7 recently broken with the traditional ML type checking / inference mechanism because it's not expressive enough for the kind of the code that Haskell wants to support. Noone has this stuff figured out, certainly not ML, Haskell, or Scala. Benjamin C Pierce has even written about how some domains are positively painful w/ strong type systems and how contracts are a more expressive solution.
I'd like to see the ideas behind the Art of the Metaobject Protocol applied to type systems. Allow users to selectively fill those holes that relevant for their domain.
I don't see any mention of a specific safety problems. Plus, I am given to believe that there are actually numerous papers on the extensions involved in the Haskell type system. Consider http://haskell.org/haskellwiki/Simonpj/Talk:OutsideIn
That is the paper I'm referring to. Type safety is an arms race with expressiveness and the paper pretty much says so.
REPLY: You're argument is reductive to the point of being useless - i.e. you could write a type checker for a domain of programs so small as to be comical. type safety and the domain of the provable programs are inextricably intertwined.
I guess I'm not following, because type safety is a property of typed language. Expressive power is orthogonal. There are type systems that are more expressive and less expressive and ideally you design your language so that regardless of where it lies on the spectrum it has type safety. Otherwise, the type system does not really provide you with any real guarantees.
"I guess I'm not following, because type safety is a property of typed language. Expressive power is orthogonal."
This is where you have it wrong, and it's well known that it's wrong. Anyways...
Scala's is a series of compromises made to give a more expressive type system to a language that interacts with the JVM and and Java libraries. Saying its not "safe" to some arbitrary metric is neither insightful nor helpful to anyone. You can find it as "ironic" as you like, but it's not a particularly fair criticism by many metric.