Is there ever an instance when you do want to compare object identity instead of “equal”-ness? I find this behaviour just confusing for beginners and not useful for experts.
99.99% of the time you want to compare by value, which is why languages defaulting to comparing by reference is a stupid default.
There are use cases. Like containers where the pointer to the object itself is the key (for example a set). But they are niche and should be implemented by the standard library anyway. One of the things I hate most about Java is .equals() on strings. 99.999% of times you compare strings, you want to compare the contents, yet there is a reserved operator to do the wrong comparison.
Java has the hash interface for using in containers. You don’t need to override equality for it.
The joke is even funnier on my client
Yes, it blends in with Voyager’s UI because it’s a screenshot of Voyager’s UI.
You’re using Java, there’s your problem
This syntax isn’t actually a problem by itself. Go does this too (no operator overloading)
In Go you can compare structure instances with == (by value). You can also compare pointers (in which case they can be different even if values are equal). You get what you ask for.
Also, I’ve never needed “Equals” method in Go.
I think you can also == two structs in Java, but not classes.
Where’s the original post?
No longer on the internet, due to the OP’s instance is now defunct.
It was probably on AWS
OP’s website makmarian.com still works despite all the
==
usage
Not really true, instances that were around to federate with kbin.social have a copy, even a preview image (see my other comment).