Re:Shen more strongly typed than Haskell?
by bravura on Tuesday September 09, 2014 @02:09AM
(#8288958)
Can you elaborate upon in which domains that power is worth it? And when it is not?
As a polarizing example—proof assistants use dependent typing. Their goal is to express interesting mathematical theorems as types and then finding typechecking programs constitutes as proof of those theorems. They absolutely want power and richness over inference---you probably wouldn't want to write a program with an inferable type anyway. It would be too boring.
Note, that power is a tradeoff in type systems. Typically, greater power can be beneficial for encoding more sophisticated predicates into the type system... but it'll almost certainly have consequences. Normally, power leads to a loss of inference, a need to pass around more type information to prove your claimed types, and/or loss of totality.
Whether the power is worth it depends upon your domain.