> When SPJ says something is hard 
> (http://research.microsoft.com/en-us/um/people/simonpj/papers/haskell-retrospective/HaskellRetrospective.pdf,
>  slide 46), I believe him!

I prefer to interpret that slide as saying that inventing them was
hard. We are in the comfortable position of having their work to build
on. Note that the far right of the graph says 'Hey, what's the big
deal?'.

> But it would be a bigger problem if we tried to bring in full type inference. 
> Hindley-Milner is all about inferring the most general type. Having the 
> compiler decide to make our code unnecessarily polymorphic means making it 
> unnecessarily slow. :) But there aren't many languages with type classes, and 
> I've never heard of one without inference. I'm not sure what that would look 
> like.

I expect we're definitely going to keep requiring full type
specifications for top-level functions (and I think that's a very good
thing--though I may at some point argue that for inner functions they
should be optional). Doing Hindley-Milner type inference with required
top-level specifications removes the problem of overzealous
generalization. I think this would be a good road to take (though I
get the impression others on the team are less enthousiastic about
H-M).
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to