In researching how
Atom and the
FeedValidator should handle URI equivalence, I took a look at
how language environments with built in URI classes implement
equality methods.
Gack. Just hypothetically, if someone wanted to write carefully-done URI comparator, I suppose the cleanest thing would be to subclass URI... maybe not. Since it doesn't really have any exposed fields that seem useful, you might just as well do a URIEquivalenceChecker class with a single static method taking two URIs and some way of expressing how hard you want to try...
Perhaps I should have qualified: "registered" URI schemes. The irc:// scheme has had several drafts over the years, but never made it to final RFC status.
A few more can be found here which still does not include feed: nor tag: nor urn:uuid, all of which can be found out in the wild.
Makes me wonder if the registration process is broken to the point where the concept of registered schemes is increasingly becoming less and less relevant.
Some interesting recent reads: Bertrand on rhino shell Stefano on Semantic web specs Sam with some tests on URI equivalency (and more by clicking through the comments...) Observations from Paul Graham via Brian......
[more]
Sam Ruby: In researching how Atom and the FeedValidator should handle URI equivalence, I took a look at how language environments with built in URI classes implement equality methods. Randy: Question? How would the Python URI type or class do? Is it...
Mark: Java is totally borked. Tim Bray: Gack. Just hypothetically, if someone wanted to write carefully-done URI comparator (in Java). Randy: Bookmarked by someone....
I think I underestimated how sticky Moveable Type is. Vendors love things that make their product sticky. If developers really appreciated this software products would be even more sticky. Instead developers hate sticky; they call it things like...
Mark Pilgrim's Identifying Atom article indirectly makes three assertions about what would be ideal in a syndication protocol with respect to ids, which I will paraphrase thus: IDs are mandatory the semantics on how/when IDs are to be generated and wh...
[more]
Preserving Identity. Mark Pilgrim"s Identifying Atom article indirectly makes three assertions about what would be ideal in a syndication protocol with respect to ids, which I will paraphrase thus: IDs are mandatory the semantics on how/when IDs are...
I’ve been up to no good again. I keep changing my directory structure around. Nothing feels quite right, but each time I change it, it seems a bit better than the last time. In any case, my svn repository for this project is now something of a...
I’ve been up to no good again. I keep changing my directory structure around. Nothing feels quite right, but each time I change it, it seems a bit better than the last time. In any case, my svn repository for this project is now something of a...
In Java equals is very closely linked to hashcode.
If you encode before comparing in .equals, then you must encode before calculating your hashcode() for storage and retrieval in HashMap/HashTable/HashSet etc. That leaves you with a pretty slow hashcode() function, espeicially if you have to re-size the hashmap. So URI may “suck” for performance reasons. If you don’t encode in hashcode too then [link] goes into your hashset and [link] won’t get it out.
Note that this definitely means you never want URL to be a key in your hashmap! :) wanna take bets on what hashcode() does to create a hash value (I haven’t checked yet).
I’ve been up to no good again. I keep changing my directory structure around. Nothing feels quite right, but each time I change it, it seems a bit better than the last time. In any case, my svn repository for this project is now something of a...
Bogtha on Mr. Gosling - why did you make URL equals suck?!?
Wow. That’s monumentally bad for any library, let alone the standard library. Whoever thought that would be a good idea? > Argh! This class sucks and I refuse to ever use it again. I’ll always use URI from now on since it doesn’t suck. Sorry,...