Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reminder: Object.ReferenceEquals vs. LanguagePrimitives.PhysicalEquality #489

Closed
kMutagene opened this issue Jan 28, 2025 · 1 comment
Closed
Labels
Status: Needs Triage This item is up for investigation.

Comments

@kMutagene
Copy link
Member

https://stackoverflow.com/questions/39217116/how-do-i-check-for-reference-equality-in-f

@github-actions github-actions bot added the Status: Needs Triage This item is up for investigation. label Jan 28, 2025
@HLWeil
Copy link
Member

HLWeil commented Mar 6, 2025

Thanks for brining this up. We make use of System.Object.ReferenceEquals which is being compared to LanguagePrimitives.PhysicalEquality in the discussion you posted.

Looking into the two arguments against Object.ReferenceEquals, both don't apply:

  1. I don't see any case where we would want to compare the reference equality of e.g. a study and an assay. That would always return false and we would lose some type safety for absolutely no reason.

  2. We use this function exclusively on classes, so the primititve type case does not apply.

Therefore will close for now.

@HLWeil HLWeil closed this as completed Mar 6, 2025
@github-project-automation github-project-automation bot moved this to Done in ARCStack Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage This item is up for investigation.
Projects
Status: Done
Development

No branches or pull requests

2 participants