Skip to content

Rename record equality parameters to 'left' and 'right'#51973

Merged
RikkiGibson merged 3 commits intodotnet:mainfrom
C-xC-c:main
Mar 20, 2021
Merged

Rename record equality parameters to 'left' and 'right'#51973
RikkiGibson merged 3 commits intodotnet:mainfrom
C-xC-c:main

Conversation

@C-xC-c
Copy link
Contributor

@C-xC-c C-xC-c commented Mar 18, 2021

Fixes #49300

@C-xC-c C-xC-c requested a review from a team as a code owner March 18, 2021 22:25
@ghost ghost added the Area-Compilers label Mar 18, 2021
@dnfadmin
Copy link

dnfadmin commented Mar 18, 2021

CLA assistant check
All CLA requirements met.

@RikkiGibson RikkiGibson added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Mar 18, 2021
@RikkiGibson RikkiGibson self-assigned this Mar 18, 2021
@jcouv
Copy link
Member

jcouv commented Mar 18, 2021

In general, changing parameter names would be a breaking change since callers may use explicit argument names. But I think we're okay because those are operators.

We'd need a corresponding update to the spec:
https://github.com/dotnet/csharplang/blob/main/proposals/csharp-9.0/records.md#equality-members

@jcouv jcouv self-assigned this Mar 18, 2021
@jcouv jcouv added the Feature - Records Records label Mar 18, 2021
@C-xC-c
Copy link
Contributor Author

C-xC-c commented Mar 18, 2021

I have created a pull request for the required spec changes here dotnet/csharplang#4555

To reflect changes to record equality operators
Copy link
Member

@jcouv jcouv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM Thanks (iteration 3)

@RikkiGibson
Copy link
Member

Planning to merge this afternoon, once we're sure that there's no objection from the language design team.

@RikkiGibson RikkiGibson merged commit 791d60f into dotnet:main Mar 20, 2021
@ghost ghost added this to the Next milestone Mar 20, 2021
@RikkiGibson
Copy link
Member

Thanks for your contribution @C-xC-c!

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

Labels

Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. Feature - Records Records

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Record operator parameter names are 'r1' and 'r2' rather than 'left' and 'right'

6 participants