Skip to content

define Ord as a total ordering and remove the f32/f64 implementation (similarly, remove the Eq implementation) #10320

Closed
@thestinger

Description

@thestinger

The operators will still work, because they are a language feature. This would remove the need for TotalEq and TotalOrd. The current situation is too complex and traits without requirements aren't good traits. These do need some kind of definition, whether it's a total ordering or a weak ordering.

Floating point types could still implement these via the IEEE754 total ordering predicate. For equality, it will be as fast as it's just a bitwise comparison. It looks like there's no way to avoid a performance hit for comparisons, but the traditional weak ordering can still be provided via alternate methods.

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