Skip to content

RFC: make default comparisons as deep as a clone #5767

Closed
@thestinger

Description

@thestinger

Traversing @ will recurse forever if there's a cycle. It would be more consistent to use owned trees as the building block for everything, and avoid just having a special case for Clone. There shouldn't be a default Ord/TotalOrd for @t at all imo, just Eq/TotalEq for identity comparison or no default impl.

A different form of equality is still easy to implement, you just wouldn't be able to derive deep equality and shoot yourself in the foot as easily.

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