Skip to content

Consider Blocking Default Equality #654

Description

@Noggog

Lots of people accidentally stick the whole record in key type areas: Dictionary<Npc, bool>

This is almost never what they intend.
Might be good to throw an exception on equality/hashing by default, with the message that they should be more intentional and choose which EqualityComparer to use explicitly (maybe with a readme link)

This way users would have to choose more explicitly Dictionary<Npc, bool>(MutagenEquality.ByFields) or somesuch. ByFormKey being the one most recommended.

Main drawback would be backwards incompatibility. But for most, that'd actually be a good thing to fix.

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