Skip to content

Source generator proposal: Equality #48733

Description

@333fred

We should consider building and shipping a source generator for equality as part of the default .NET tooling. The C# LDT has explicitly backed off from doing a completely-customizable equality feature: https://github.com/dotnet/csharplang/blob/master/meetings/2020/LDM-2020-03-30.md#value-equality. However, it seems like customizable equality (such as sequence equality for collections, case-insensitive comparison for strings, other customizations) are and will continue to be a pain point. We should consider building a first-party generator for equality, with annotation types built into the framework and the generator shipped with the SDK. If we don't do this with the initial release of source-generators or soon afterwards, we may end up with a fractured ecosystem of such generators with no consistent style.

/cc @chsienki

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions