-
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
Rename UFCS to accurately reflect its functionality. #1140
Comments
Still sounds too jargony, why not just "trait disambiguation syntax". |
@bstrie because it also works for non-trait Associated Items. |
+1 for replacing “UFCS”. |
Acronyms are a barrier to comprehension, I'm not a fan of inventing new ones. "UFCS" only works because it's vaguely familiar from other languages (though we do it exactly opposite to other languages, so I wouldn't be sad to see it go). Let's come up with a name that isn't so verbose that it warrants an acronym. Just "lookup syntax" would probably suffice. |
@bstrie but do you mean Module Lookup Syntax, Field/Method Lookup Syntax or Associated Item Lookup Syntax? |
@bstrie: "lookup syntax" is a very vague term though, and "UFCS" is currently being used. So, assuming that people will continue to use a more specific term, I'd rather it be AILS than UFCS. |
Acronyms are opaque and only raise the barrier of entry to learning. That aside, "AILS" sounds like a disease and is approximately as disquieting as our unfortunate abbreviation of "std" for the standard library. It's not worth the effort to go from one slightly-incorrect-and-slightly-known acronym to a techically-correct-but-entirely-unknown acronym. I'm not a fan of "UFCS", but "AILS" isn't better by any stretch of the imagination. I'm sure you can come up with a description that's both pithy and self-explanatory. |
I consider "Associated Item Lookup Syntax" to be self-explanatory as long as you know what an associated item is. |
"Item" is already jargon, and "associated item" is doubly so. Don't make the same mistake as the Unicode consortium and presume that the technical precision of a phrase like "grapheme cluster" will either aid in understanding or actually make anybody want to use said phrase. Let's also step back and realize that the designers of C++ must have thought they were onto something when they coined "RAII" and "SFINAE". Naming is hard, acronyms are the lazy way out. |
I agree with @bstrie that confusing acronyms should not be used in the documentation. However, I'm not sure I agree that "associated item" is too jargony. Calling it "the associated item lookup syntax" seems like it might work. If you want to use the "AILS" acronym in a conversation where you're reasonably sure no one will be confused by it, then that seems okay to me. |
How about:
|
@aturon we also call The feature to be named (previously "UFCS") encompasses the use of 3 different path syntaxes:
With the last one being usable as both Without this feature, |
@eddyb Right, so I know that various aspects of paths were added under the moniker of UFCS, but I'm wondering whether we actually need to keep around a name for those feature "deltas" at all, rather than just straightforward names for the different kinds of paths component as you suggest. |
This was linked from the meeting minutes, in which OIBITs were mentioned as another example - I don't know if this comment is off-topic. OIBIT is really bad terminology, since the traits its referring to ( I've never needed the term UFCS to think or talk about Rust syntax; I started using Rust in December, so I don't think I experienced Rust without it. I'm not sure a name for it is actually useful and thinking of it as a distinct thing from "Rust syntax" might be unnecessary. |
Is there a term that we're using now or do people still say UFCS? When I need to refer to the fully disambiguated name for an item, I usually call it the "canonical name" or "disambiguous name." I don't usually refer to the syntax for such names in itself. |
@withoutboats I think UFCS is still the accepted term. |
Almost exactly a year ago, we had a long discussion in @rust-lang/core about this. I never sent in a PR. I think it was something like "path disambiguation syntax", cc @eddyb as well as core |
@steveklabnik It may be that that was what you chose, but the accepted wording of the community is UFCS. IMO, we need to come up with a term that rolls off the tongue better than "path disambiguation syntax", if we actually want to replace UFCS; "RAII" is not accepted in the C++ community because it explains what's happening well, it's used because it's easy to say, and embedded in the mindspace of community members. |
As I've said, I don't find myself needing to discuss this syntactic form often. While an acronym like UFCS was useful when designing and implementing this aspect of the language, I don't think this needs to be named as such. I'd prefer if rather than treating this as a discrete 'feature,' in documentation & discussion we just regard all items as having a "fully disambiguated" or "canonical" name, for which this is the syntax (therefore the "disambiguous'"or "canonical" syntax). Probably we should document that this syntax is sometimes called UFCS for historical reasons, but I don't think it should be conceived of in the manner that the terminology of UFCS has suggested. This is similar to how if/when the ATC proposal is implemented, I believe we should just document it as a part of documenting associated types - as 'associated types can take parameters' - rather than framing it as a distinct feature. |
@withoutboats People talk about it on IRC, however, like, "how do I call this" "oh, use UFCS"; or "how do I access a specific type parameter", "use UFCS". |
Very much in agreement with @withoutboats's and @eddyb's sentiment here. I think not-neccesarily-cannoncial paths that nevertheless include various associated items could be called "dotless"—there's a lot of catchiness in that adjective if I may say so :). |
I basically agree with this -- note that what's disambiguated is not just the name, but also the borrowing and dereferencing being performed on |
@withoutboats How about "explicit syntax"? |
"explicit path" is a more specific term I could get behind. |
@withoutboats Thinking a bit more: I'm not sure you can avoid it being thought of as a discrete feature, given that it has discrete syntax, and that we do need some way to refer to that syntax. I don't think that "UFCS" as such refers to a particularly coherent feature, though. I want to be able to say something like: "When you invoke a method using XX syntax, |
@ubsan That's going to be a hard bar to meet. I'll note that we have terms like "associated types", which are much longer yet come up much more often. |
I suppose that a part of the confusion is that Therefore,
Should probably be
I suppose I wouldn't call |
This issue seems out of place here; I've refiled to the reference. |
UFCS
("Unified Function Call Syntax" #132) ended up being merely an "unified syntax", but not specific to functions and less so to calls.It also doesn't allow calling free functions like methods, like D's UFCS does.
To avoid turning our feature into another
RAII-AA
("Acronym Accident"), I propose renaming it toAILS
("Associated Item Lookup Syntax").The text was updated successfully, but these errors were encountered: