-
Notifications
You must be signed in to change notification settings - Fork 477
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
Add type inference example #136
Conversation
This should make the chapter a bit more approachable, as it doesn't start with a reference to the HM type inference algorithm.
61e45c4
to
d3eb7ba
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As someone currently reading through the guide, I appreciate this addition.
I am curious, is there a reason for using inferenced
over inferred
? I thought that the latter was correct.
Thanks! I'm doing the same right now to potentially fix rust-lang/rust#50548 at some point in the future :)
|
Oh very interesting, thanks for sharing! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Just a minor nit, then r=me.
Re: inferred vs inferenced: I think we can leave this as-is for now. If someone else comes along with more info later, we can revisit...
src/type-inference.md
Outdated
} | ||
``` | ||
|
||
Here, `things` is *inferenced* to be `&str` because that's the value we push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "things is inferenced to be &str
" -> "the type of things is ..."
08d7eb2
to
9ef4d04
Compare
Fixed 👍 |
Thanks! |
This should make the chapter a bit more approachable, as it doesn't
start out with a reference to the HM type inference algorithm.