6 ms·
>Doesn't Java also have things that use reference equality? Arrays? Yes. There are inconsistencies all over the place. In fact, OPs example of java.io.File is
by macspoofing 4y ago
>Doesn't Java also have things that use reference equality? Arrays?
Yes. There are inconsistencies all over the place. In fact, OPs example of java.io.File is ironic, because that object had a number of issues and was somewhat replaced by java.nio.file.Path [1].
Even outside of that, file equality in general is fraught with a lot of subtlety. For example, should java.io.File equality be case sensitive or insensitive?
[1]https://docs.oracle.com/javase/tutorial/essential/io/legacy.html https://docs.oracle.com/javase/tutorial/essential/io/legacy....