-
-
Notifications
You must be signed in to change notification settings - Fork 18
PERF: value types end up boxed #8
Copy link
Copy link
Open
Labels
Description
Given S, D value types here, when doing a.Equals(b), they end up using the Equals(object) overload.
Maybe it would be good to have EqualityComparer<T>.Default.Equals(a, b) there?
I initially wanted to suggest having S:IEquatable<D>, D:IEquatable<S>, There's also the problem when one of S values is null, since a.Equals(b) would NRE. I know that having nulls is bad design, but better safe than sorry?
Reactions are currently unavailable