-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Shorten Associated
to Assoc
and rename Method
to AssocFn
.
#60163
Comments
I think that discussing terminology like this is probably a good fit for a design meeting. I also think this particular change is a good idea. |
I've added this to my temporary list of design meeting ideas |
Hi @eddyb @nikomatsakis I'd like to work on this if the decision has been made. |
@agnxy one thing that doesn't need a decision is to change all things named |
This is to fix the breakage introduced by rust-lang/rust#60163.
Rename "Associated*" to "Assoc*" This change is for rust-lang#60163. r? @oli-obk
Rename "Associated*" to "Assoc*" This is to fix the breakage introduced by rust-lang/rust#60163. changelog: none
Rename "Associated*" to "Assoc*" This is to fix the breakage introduced by rust-lang/rust#60163. changelog: none
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc rust-lang#69498 rust-lang#60163
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc rust-lang#69498 rust-lang#60163
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc rust-lang#69498 rust-lang#60163
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc rust-lang#69498 rust-lang#60163
Rename DefKind::Method and TraitItemKind::Method r? @eddyb, @Centril, or @matthewjasper cc rust-lang#69498 rust-lang#60163
More Method -> AssocFn renaming r? @Centril @eddyb cc rust-lang#60163 Blocked on rust-lang#69674
More Method -> AssocFn renaming r? @Centril @eddyb cc rust-lang#60163 Blocked on rust-lang#69674
Remaining possible renames:
There's also things like |
Note: as part of the effort to "extract a shared library for types", I want to do a review of naming conventions for things like this and try to reach some decisions. |
I have mixed feelings about "shortening things" like |
But I think that using "associated function" instead of "method" is perhaps wise, particularly if it applies uniformly to things with |
Rename AssocKind::Method to AssocKind::Fn Part of rust-lang#60163. rust-lang#60163 (comment)
…, r=eddyb,varkor Rename AssociatedItems to AssocItems Signed-off-by: Rustin-Liu <[email protected]> Part of rust-lang#60163 (comment)
…, r=eddyb,varkor Rename AssociatedItems to AssocItems Signed-off-by: Rustin-Liu <[email protected]> Part of rust-lang#60163 (comment)
…, r=eddyb,varkor Rename AssociatedItems to AssocItems Signed-off-by: Rustin-Liu <[email protected]> Part of rust-lang#60163 (comment)
…, r=eddyb,varkor Rename AssociatedItems to AssocItems Signed-off-by: Rustin-Liu <[email protected]> Part of rust-lang#60163 (comment)
…r=eddyb,varkor Rename AssociatedItems to AssocItems Signed-off-by: Rustin-Liu <[email protected]> Part of rust-lang#60163 (comment)
@eddyb can this issue be closed? From what I understand of the discussion above all the renamings accepted were done, and the permalinks from your comment give a 404 when I try to move to the master branch because src/librustc no longer exists |
We've been moving away from the "static method" terminology, so IMO we should be more uniform with all associated items, and treat the general case of "methods that may or may not have
self
" as simply "associated functions"."Method" terminology would then remain primarily for "method call", i.e. dot syntax for asymmetrically providing the
self
argument.Because
AssociatedFn
is a bit long, I'd find it fitting if we shortenedAssociated
, across rustc, toAssoc
, so we end up withAssocFn
(which only one letter longer thanMethod
).Also, when
Method
appears in the context of associated items already (e.g.{Trait,Impl}ItemKind
), it can be justFn
.cc @rust-lang/compiler (and in particular, I'm curious what @nikomatsakis thinks the decision process for "cosmetic" changes like these should be)
The text was updated successfully, but these errors were encountered: