Add a built function refEqual<T>(a: T, b:T)
to always compare ref equality
#2668
Labels
refEqual<T>(a: T, b:T)
to always compare ref equality
#2668
Feature suggestion
When meet
==
operator overload. There is no way to know if the ref is same.For reference type, it's very helpful to know the ref equality in many scenarios.
For value equality, we want to compare whether the values are equal. For example, as an index key, it is impossible to rely on comparison references, because the external key is newly constructed by itself.
But we still need the ref equality for such type.
BTW, use
===
to represent this sematic is fine.The text was updated successfully, but these errors were encountered: