Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SteveAlexander
Copy link

@SteveAlexander SteveAlexander commented Jan 4, 2023

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

@ehuss ehuss added T-lang Relevant to the language team, which will review and decide on the RFC. not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc. labels Jan 4, 2023
Comment on lines +7 to +14
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.
Copy link
Member

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.

Comment on lines +73 to +77
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.
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-rfc For PRs that fix things like spelling mistakes, wrong file names, etc. T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants