Skip to content

rename std::num::Zero and std::num::One #13699

Closed
@liigo

Description

@liigo

std::num::Zero means neither "the number 0"(noun) nor "zero a value"(verb).
std::num::One does not means "the number 1" (or once).
They are both ambiguous and confusing. There are many comments here:
https://mail.mozilla.org/pipermail/rust-dev/2014-April/009432.html

std::num::Zero should be renamed to std::num::AddIdentity,
std::num::One should be renamed to std::num::MulIdentity,
to match their original meanings.

(Or put them in a separate module: std::num::identity::{Zero, One}.)
(Or we remove them entirely from std.)

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