Brian Hulley wrote:
Fred Hosch wrote:
Is type inferencing in Haskell essentially the same as in SML?
The most significant difference certainly is that type inference has
been beefed up with type classes in Haskell, which are quite a powerful
mechanism refining Hindley/Milner inference.
Besides that, Haskell allows some additional programs for which types
can /not/ be inferred (e.g. the examples Brian was giving), while SML
does not.
SML also has a complicated thing called the "value restriction" because
it allows mutable references to be altered via side effects. Because
Haskell has no side effects, there is no need for a value restriction.
Although there is no "need" for it, Haskell still has it, in minor
variation. It is commonly known as "The Dreaded Monomorphism
Restriction" ;).
- Andreas
--
Andreas Rossberg, [EMAIL PROTECTED]
Let's get rid of those possible thingies! -- TB
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe