rust-lang / rust-lang/book

Replace "is/be" or existence qualifiers with "can/able" or capability qualifiers for Traits.

Open
#2,500 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Q for ourselves
Dominant language
Rust
Stars
18.3k
Forks
4.1k
Avg merge
14m
Merged PRs (30d)
1

Description

Rust's Traits resemble capabilities more than existential qualities of a type.

Take for example the descriptions of the Send and Sync traits. Where it might benefit a programmer from a background in other OOP languages which treat Abstract Classes or Interfaces as existential qualifications (attempting to verify that they implement an interface or extend a class is usually a question within such a language which can potentially be null), Rust does not, I find, treat Traits as existential qualifiers, but more as capabilities, and thus names these as the imperative or infinitive tense forms of verbs, such as Copy, Drop, or in this case Send or Sync (aka Synchronise).

As such, references to is (not) or can(not) be should be replaced with can (not) or is/are (not) able to in their respective cases:

Almost all primitive types are Send

(From Allowing Transference of Ownership Between Threads with Send)

should be

Almost all primitive types can Send

This change in syntax, in my opinion, captures this qualitative difference in the way Rust's polymorphism is exercised.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Send and Sync descriptions in the Rust book, especially the chapter section titled “Allowing Transference of Ownership Between Threads with Send.” Search the book for trait descriptions using existence-oriented wording, then update the relevant phrasing consistently and verify the affected documentation builds correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.