Skip to content

Shorten Associated to Assoc and rename Method to AssocFn. #60163

Closed

Description

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 shortened Associated, across rustc, to Assoc, so we end up with AssocFn (which only one letter longer than Method).
Also, when Method appears in the context of associated items already (e.g. {Trait,Impl}ItemKind), it can be just Fn.

cc @rust-lang/compiler (and in particular, I'm curious what @nikomatsakis thinks the decision process for "cosmetic" changes like these should be)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-associated-itemsArea: Associated items (types, constants & functions)C-cleanupCategory: PRs that clean code up or issues documenting cleanup.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions