Skip to content

Add a built function refEqual<T>(a: T, b:T) to always compare ref equality #2668

Open
@yjhmelody

Description

@yjhmelody

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions