-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Change use of "UFCS" to "fully-qualified function call syntax" #3366
base: master
Are you sure you want to change the base?
Conversation
This RFC describes the fully-qualified syntax for making function calls, | ||
which was previously called Unambiguous or Universal Function Call Syntax | ||
(UFCS). The [Rust Reference section on call expressions] provides | ||
an overview of this syntax, and reasons for the change in terminology. | ||
|
||
There are a variety of extensions to allow any method to be used as | ||
first-class functions. The same extensions also allow for trait methods | ||
without receivers to be invoked in a more natural fashion. |
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.
Changing the structure of this entire paragraph doesn't seem necessary to add the explanatory note, and usually RFCs are preserved as close to as-written as reasonable. The intent is good overall with this PR but please favor additive over subtractive changes.
Another advantage of this proposal is that it implies that all method-calls | ||
can always be rewritten into an equivalent fully-qualified function call | ||
(see [RFC 132]). This simplifies the "core language" and makes method dispatch | ||
notation -- which involves some non-trivial inference -- into a kind of | ||
"sugar" for the more explicit fully-qualified notation. |
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.
This looks good, but is there a version that minimizes the diff?
As discussed in #3360, this PR updates RFC 132 and RFC 255 to use clearer terminology regarding fully-qualified function call syntax, and links to the relevant section of the Rust Reference.
Rendered