3 ms·
* A URL is a name for a pointer. * A URL is a parameter to a function returning a resource. * A URL is a string, conforming to a certain format. Neither of t
by desc 7y ago
* A URL is a name for a pointer.
* A URL is a parameter to a function returning a resource.
* A URL is a string, conforming to a certain format.
Neither of these specifies that the resource it points to is always the same resource, nor that it's always possible to resolve it. That's by design; hostnames change. The Web is not permanent and that's why we have eg. HTTP 404.
Network topologies also change.
However, the default equals() comparison between two objects is supposed to compare those two objects, not the current topology of the Internet.
There is no way this behaviour ever made sense, nor any way it ever could make sense. It's moronic, through and through, for any language or library, to implement default equality in this way.
If you want to implement a comparer which does stuff like this and accepts a hostname resolver as a dependency, great. But there is simply no excuse for this kind of stupidity in a default dependency-less implementation.