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

RFC 0132 doesn't expand the UFCS acronym #3360

Open
SteveAlexander opened this issue Dec 25, 2022 · 6 comments
Open

RFC 0132 doesn't expand the UFCS acronym #3360

SteveAlexander opened this issue Dec 25, 2022 · 6 comments

Comments

@SteveAlexander
Copy link

SteveAlexander commented Dec 25, 2022

I'm learning Rust, and I spent more time than I was comfortable about trying to find out what UFCS stands for. I understand that the Rust project is trying to make the learning process easier for people, so I'm writing up what happened here. I hope this is a useful place to write this.

In the course of learning, I came across the concept "object-safe trait", and read about it in the Rust Reference, which pointed me to RFC0255, which says:

Another advantage of this proposal is that it implies that all method-calls can always be rewritten into an equivalent UFCS call. 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 UFCS notation.

So, I look up 0132 to find out what UFCS is.

Although it explains about how path::method() syntax works (yay!), I'm still left wondering what on earth UFCS stands for.

A google search of "what does ufcs stand for" is useless.

A more specific search of "what does ufcs stand for in rust" gives me a useful answer on the 4th result.

This seems like a lot of work to figure this out as part of my learning journey. I'm also still unclear whether the U stands for "universal" or "unified", or either/both.

I wonder if RFC 0132 and RFC 0255 might be updated to expand the UFCS acronym, for the sake for future learners?

@Lokathor
Copy link
Contributor

Lokathor commented Dec 25, 2022

Universal Function Call Syntax.

For example, my_vec.len() is "method call syntax" but it's technically sugar for Vec::len(&my_vec), which is the "universal function call syntax".

Normally am RFC isn't updated after it's accepted, and it's just left as a historical document, but in this case I'd say a all PR to explain an acronym should be accepted (but I'm not on any rust team).

@nikomatsakis
Copy link
Contributor

Agreed that a PR would be welcome. I would like to this section in the reference:

https://doc.rust-lang.org/reference/expressions/call-expr.html#disambiguating-function-calls

which uses the terminology "fully-qualified function call".

@SteveAlexander
Copy link
Author

Thanks both. I'll put together such a PR.

@SteveAlexander SteveAlexander changed the title RFC 1032 doesn't expand the UFCS acronym RFC 0132 doesn't expand the UFCS acronym Jan 4, 2023
SteveAlexander added a commit to SteveAlexander/ufcs_terminology_update that referenced this issue Jan 4, 2023
@scarf005
Copy link

scarf005 commented Jan 9, 2023

unrelated to the topic but for a bit of advice on googling:

wikipedia article on Uniform Function Call Syntax

first result of googling ufcs programming gives above link.
third result of googling ufcs gives above link.

@lebensterben
Copy link

abbreviations of technical terms could impose barriers for new comers to the rust community.

we should require all API documentations and RFCs to at least use the unabbreviated term once per document, before using abbreviations.

@SteveAlexander
Copy link
Author

Following up, because I'm not sure what happens next. As linked above, I have opened up a PR. Does it get reviewed at some point? Do I need to specifically request it? This is clearly not something urgent, so of course there's no concern if it takes a while. I'd just like to know if anything more is required of me at this time. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants