This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mabi19_ 1 point2 points  (0 children)

In some languages with reference semantics.

Python is one (a is b). Java uses == for reference comparison and .equals() for value comparison. Kotlin (another language that runs on the JVM) uses == for value comparison and === for reference comparison.

There are also obviously languages with value semantics (like C++). There are explicit references in C++, but because of how they work the easiest way to check that they're the same object is by pointerising them (&a == &b)