-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Global type inference #186
Comments
@nponeccop: Would calling Haskell "based on Hindley-Milner type inference" be accurate enough? |
I think something like "first-class type inference" would remain loosely understandable by laypeople not familiar with Haskell and/or Hindley-Milner languages, but it wouldn't be misleading. And I think in Type Driven Development we could explain what does it mean precisely:
|
@nponeccop: Do you mean to say "best in class type inference"? When I think "first-class" I usually understand that to mean that it is something that can be manipulated within the language (e.g. first class functions), but Haskell's type inference cannot be passed as a function argument or stored within a list/record |
The document mentions "global type inference" several times, but it isn't technically true - Haskell doesn't have a global type inference. Quite opposite, the inference tries to be as local as possible, e.g. in case of Hindley-Milner principal types.
I guess we could use https://en.wikipedia.org/wiki/Lie-to-children sparingly, but we need a better explanation of how type inference is different from auto types in other languages. E.g. two main differences is that neither generic types nor argument types are normally inferred in "normal" languages.
Just calling it "global" or "bidirectional" doesn't convey anything, especially because it's neither global nor bidirectional.
The text was updated successfully, but these errors were encountered: