-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
RFC: Remove bind #2189
Comments
Agree. |
I agree, though I do like the syntax of bind better. Maybe in the future we can add something syntactically similar as an extension. |
FWIW, I still like the change I proposed a while back where expressions |
I agree. I do think bind syntax is occasionally convenient -- like currying in Haskell, except the captured arguments don't have to be a prefix of the non-captured arguments, so it's more flexible -- but I don't think that necessarily justifies the complexity and potential confusion. |
I'd like to see classical bind removed and Niko's old proposal for desugaring calls containing |
@Lenny222. Not yet. The value of methods can still be taken, so there is some bind machinery still there. |
I have a patch to get rid of our code that depends on taking the values of methods and a patch that rips out the rest of the bind code. Still need to reject taking values of methods in the typechecker... |
run Clippy on CI and fix some things it complains about. Also use `rustup-toolchain` script on CI (reduces code duplication, and good thing to make sure it keeps working, since we recommend it in the docs). I left `ui_test` out for now; I'll leave those nits to `@oli-obk.` ;)
I think it's time for bind to go. My reasons:
foo(_, f())
this evaluatesf()
right away and binds the result into the closure. This is quite different from{|x| foo(x, f())}
which is surprising. This has led to bugs.As a side effect of this change, naming a method like
a.b
without calling it will presumably become an error.The text was updated successfully, but these errors were encountered: