Skip to content

Rust References and Lifetimes Guide is not the place for tau advocacy #17674

Closed
@joshtriplett

Description

@joshtriplett

Quoting the Rust References and Lifetimes Guide:

    Circle(_, radius) => 0.5 * tau * radius * radius,

...

(Like any up-to-date engineer, we use the tau circle constant and not that dreadfully outdated notion of pi).

Without arguing over the merits of pi versus tau, a Rust guide is not the place for introducing a less common mathematical notation that most people will not have seen. Doubly so because this is one of the specific cases where tau is less clear than pi; the equivalent code with pi would not need the extra factor of 0.5. And triply so because this should be using a constant from the standard library, like std::f64::consts::PI.

All three make this an unnecessary distraction in the middle of a Rust tutorial guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions